fix: ensure build.sh find correct changed files
- ensure the build.sh script finds the changed files for the master branch or others
This commit is contained in:
parent
8af68f6dc8
commit
224f67faa2
13
ci/build.sh
13
ci/build.sh
@ -1,10 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Check for changes in builds/ folder
|
# Check for changes in images/ folder and the builds/ folder
|
||||||
builds_changes=$(git diff --name-only master | grep -E '^builds/')
|
if [ "$(git branch --show-current)" = "master" ]; then
|
||||||
|
builds_changes=$(git diff --name-only HEAD^...master | grep -E '^builds/')
|
||||||
# Check for changes in images/ folder
|
images_changes=$(git diff --name-only HEAD^...master | grep -E '^images/')
|
||||||
images_changes=$(git diff --name-only 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/
|
# Run `make all` if there are changes in builds/
|
||||||
if [ -n "$builds_changes" ]; then
|
if [ -n "$builds_changes" ]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user