Skip to content

Commit

Permalink
Fix dry run failures due to bad && pipelines (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjagoe authored Jun 13, 2024
1 parent 7148928 commit 761a674
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion release-action-node/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ else
npm install
npm version "$VERSION"
fi
[[ "${DRY_RUN,,}" == "false" ]] && git push && git push --tags
if [[ "${DRY_RUN,,}" == "false" ]]; then
git push && git push --tags
else
echo "[dry run] Push new version" 1>&2
fi
6 changes: 5 additions & 1 deletion release-action-node/update-release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ set -euo pipefail
package_version="$(jq -r .version < package.json)"
release_branch="v${package_version//.*/}"
git checkout -b "${release_branch}"
[[ "${DRY_RUN,,}" == "false" ]] && git push -u origin "${release_branch}"
if [[ "${DRY_RUN,,}" == "false" ]]; then
git push -u origin "${release_branch}"
else
echo "[dry run] Push changes to ${release_branch}" 1>&2
fi
6 changes: 5 additions & 1 deletion release-action-node/update-without-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ git_changes="$(git status --porcelain -- dist || true)"
if [ -n "$git_changes" ]; then
git add -- dist
git commit -m "Update compiled action"
[[ "${DRY_RUN,,}" == "false" ]] && git push
if [[ "${DRY_RUN,,}" == "false" ]]; then
git push
else
echo "[dry run] Push changes" 1>&2
fi
fi

0 comments on commit 761a674

Please sign in to comment.