Skip to content

Commit fb4f0c6

Browse files
committed
refactor(updater): fail with exit code on commit
1 parent f0f9fef commit fb4f0c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

updater/cmd.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,8 @@ ditto analyze --data-dir ./data
4949
git add data
5050
git config user.name "$COMMIT_NAME"
5151
git config user.email "$COMMIT_EMAIL"
52-
git commit -m "$COMMIT_MESSAGE"
52+
if ! git commit -m "$COMMIT_MESSAGE"; then
53+
echo "The generated data doesn't bring any updates"
54+
exit 2
55+
fi
5356
git push -fu origin "$BRANCH_NAME"

0 commit comments

Comments
 (0)