Skip to content

Commit 58f7c15

Browse files
committed
exit gracefully if there is no change
1 parent 763bd04 commit 58f7c15

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dev/openapi.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ git config --global user.email "41898282+github-actions[bot]@users.noreply.githu
3030

3131
cd "$BRANCH"
3232
cp -f "$OPENGROK_BUILD_DIR/target/openapi-validation/index.html" ./openapi.html
33-
git add openapi.html
33+
git add -f openapi.html
34+
if [[ -z $( git status -s ) ]]; then
35+
echo "No change, bailing out"
36+
exit 0
37+
fi
3438
git commit -m "Latest OpenAPI auto-pushed to branch $BRANCH"
3539
git push -fq origin "$BRANCH"
3640

0 commit comments

Comments
 (0)