diff --git a/scripts/cleanup-update-branches.sh b/scripts/cleanup-update-branches.sh index 5f06eaa..4ed3bcb 100755 --- a/scripts/cleanup-update-branches.sh +++ b/scripts/cleanup-update-branches.sh @@ -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 diff --git a/scripts/release.sh b/scripts/release.sh index 7e8b356..a6de5a4 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -4,4 +4,4 @@ set -e -gh release create v$(cat extism/VERSION) --generate-notes +gh release create v"$(cat extism/VERSION)" --generate-notes diff --git a/scripts/set-version.sh b/scripts/set-version.sh index 7fa3e3b..776ef83 100755 --- a/scripts/set-version.sh +++ b/scripts/set-version.sh @@ -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 diff --git a/scripts/update-deps.sh b/scripts/update-deps.sh index f2cc42b..a296735 100755 --- a/scripts/update-deps.sh +++ b/scripts/update-deps.sh @@ -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" diff --git a/scripts/update-extism-cli.sh b/scripts/update-extism-cli.sh index 7e2ae61..695ee59 100755 --- a/scripts/update-extism-cli.sh +++ b/scripts/update-extism-cli.sh @@ -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