Skip to content

Commit

Permalink
cleanup: use shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Dec 30, 2023
1 parent 938758d commit 8a191e3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions scripts/cleanup-update-branches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ set -e

git branch -l "update-deps-*" --format "%(refname:short)"| while read -r branch ; do
echo "Removing local branch: $branch"
git branch -D $branch
git branch -D "$branch"
done

git branch -r --format "%(refname:short)" | grep -o 'update-deps-.*' | while read -r branch ; do
echo "Removing remote branch: $branch"
git push origin --delete $branch
git push origin --delete "$branch"
done


Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

set -e

gh release create v$(cat extism/VERSION) --generate-notes
gh release create v"$(cat extism/VERSION)" --generate-notes
4 changes: 2 additions & 2 deletions scripts/set-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# usage: ./scripts/set-version 0.0.0

set -eu
version=$(echo -n $1 | sed 's/v//g')
echo -n $version > extism/VERSION
version=$(echo -n "$1" | sed 's/v//g')
echo -n "$version" > extism/VERSION
10 changes: 5 additions & 5 deletions scripts/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
set -eu

BRANCH="update-deps-$(date +%s)"
git checkout -b $BRANCH
git checkout -b "$BRANCH"
go get -u
go mod tidy

# push to new branch, get HEAD hash
git commit -am "chore: update cli deps"
git push origin $BRANCH
git push origin "$BRANCH"
GIT_HASH=$(git rev-parse HEAD)

# update extism
cd extism
go get -u
go get -u github.com/extism/cli@$GIT_HASH
go get -u "github.com/extism/cli@$GIT_HASH"

# update extism-dev
cd ../extism-dev
go get -u
go get -u github.com/extism/cli@$GIT_HASH
go get -u "github.com/extism/cli@$GIT_HASH"
go mod tidy

# Create commit and push
git commit -am "chore: update extism and extism-dev deps"
push push origin $BRANCH
push push origin "$BRANCH"

echo "Update complete"
echo "If gh is installed, a pull-request can be opened with the following command"
Expand Down
8 changes: 4 additions & 4 deletions scripts/update-extism-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
GIT_HASH=$(git rev-parse HEAD)

# update extism
cd extism
go get -u github.com/extism/cli@$GIT_HASH
cd extism || exit 1
go get -u "github.com/extism/cli@$GIT_HASH"

# update extism-dev
cd ../extism-dev
go get -u github.com/extism/cli@$GIT_HASH
cd ../extism-dev || exit 1
go get -u "github.com/extism/cli@$GIT_HASH"
go mod tidy

# Create commit and push
Expand Down

0 comments on commit 8a191e3

Please sign in to comment.