Skip to content

Commit

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

* Expand command flag
  • Loading branch information
gururajsh committed May 24, 2024
1 parent 01a610c commit e765c5a
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 github-actions@github.com
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 github-actions@github.com
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 e765c5a

Please sign in to comment.