Skip to content

Commit

Permalink
hint refresh: do not commit if no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tahina-pro committed Jul 9, 2021
1 parent 371e471 commit a8006eb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .docker/build/build.sh
Expand Up @@ -226,7 +226,16 @@ function refresh_hints_dist() {

clean_build_dist || return 1

git commit --allow-empty -m "[CI] $msg"
# If no changes were staged, then exit.
# From: https://stackoverflow.com/a/2659808
if git diff-index --quiet --cached HEAD -- ; then
return 0
fi

# Commit. This will fail if the commit is empty,
# but that scenario should be ruled out by the test above
git commit -m "[CI] $msg"

# Memorize that commit
commit=$(git rev-parse HEAD)
# Drop any other files that were modified as part of the build (e.g.
Expand Down

0 comments on commit a8006eb

Please sign in to comment.