-
Notifications
You must be signed in to change notification settings - Fork 929
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version check to CLAW update [v7] (#2908)
* Add version check to CLAW update * Expand command flag
- Loading branch information
Showing
1 changed file
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
||
|
@@ -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: |