Skip to content

Commit

Permalink
Fix bump CI when allwpilib tag is slid (#613)
Browse files Browse the repository at this point in the history
Check if tag already exists and don't do the version patch again
  • Loading branch information
sciencewhiz authored Sep 19, 2024
1 parent 7c1b45b commit 773780d
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ jobs:
run: |
git config user.name github-actions
git config user.email [email protected]
git am -3 < .github/workflows/0001-Disable-compile-tests-until-GradleRIO-released-.patch
sed -i 's/wpilibRelease = \".*/wpilibRelease = \"${{ github.event.client_payload.package_version }}\";/' src/main/java/robotbuilder/exporters/GenericExporter.java
./gradlew build test -x htmlSanityCheck
git commit -a -m "Bump export version to ${{ github.event.client_payload.package_version }}"
git push origin
git tag ${{ github.event.client_payload.package_version }}
TAG_EXISTS=$(git tag -l "${{ github.event.client_payload.package_version }}")
if [ ! "$TAG_EXISTS" ]; then
git am -3 < .github/workflows/0001-Disable-compile-tests-until-GradleRIO-released-.patch
sed -i 's/wpilibRelease = \".*/wpilibRelease = \"${{ github.event.client_payload.package_version }}\";/' src/main/java/robotbuilder/exporters/GenericExporter.java
./gradlew build test -x htmlSanityCheck
git commit -a -m "Bump export version to ${{ github.event.client_payload.package_version }}"
git push origin
fi
git tag -f ${{ github.event.client_payload.package_version }}
git push origin ${{ github.event.client_payload.package_version }}
git revert HEAD~1
git push origin
if [ ! "$TAG_EXISTS" ]; then
git revert HEAD~1
git push origin
fi

0 comments on commit 773780d

Please sign in to comment.