diff --git a/ci/build.sh b/ci/build.sh index 8e34e4d..f8be9e2 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -1,10 +1,13 @@ #!/bin/bash -# Check for changes in builds/ folder -builds_changes=$(git diff --name-only master | grep -E '^builds/') - -# Check for changes in images/ folder -images_changes=$(git diff --name-only master | grep -E '^images/') +# Check for changes in images/ folder and the builds/ folder +if [ "$(git branch --show-current)" = "master" ]; then + builds_changes=$(git diff --name-only HEAD^...master | grep -E '^builds/') + images_changes=$(git diff --name-only HEAD^...master | grep -E '^images/') +else + builds_changes=$(git diff --name-only master | grep -E '^builds/') + images_changes=$(git diff --name-only master | grep -E '^images/') +fi # Run `make all` if there are changes in builds/ if [ -n "$builds_changes" ]; then