Skip to content

Commit

Permalink
Add version check to CLAW update [v7] (#2908)
Browse files Browse the repository at this point in the history
* Add version check to CLAW update

* Expand command flag
  • Loading branch information
gururajsh authored May 24, 2024
1 parent 604bb7b commit 6cc5bfe
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/release-build-sign-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: cloudfoundry/CLAW
ref: develop
ref: master
path: CLAW
ssh-key: ${{ secrets.GIT_SSH_KEY_CLAW }}

Expand All @@ -1076,18 +1076,23 @@ jobs:
set -ex
pushd CLAW
echo "- ${VERSION_BUILD}" >> claw-variables.yml
git add claw-variables.yml
if ! [ -z "$(git status --porcelain)"]; then
git config user.name github-actions
git config user.email [email protected]
git commit -m "Add CF CLI ${VERSION_BUILD}"
if grep --quiet "${VERSION_BUILD}" "claw-variables.yml" ; then
echo 'Version already exists in CLAW.'
exit 1
else
echo "no new version to commit"
echo "- ${VERSION_BUILD}" >> claw-variables.yml
git add claw-variables.yml
if ! [ -z "$(git status --porcelain)"]; then
git config user.name github-actions
git config user.email [email protected]
git commit -m "Add CF CLI ${VERSION_BUILD}"
else
echo "no new version to commit"
fi
git push
fi
git push
popd
# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell:

0 comments on commit 6cc5bfe

Please sign in to comment.