Improve Travis CI auto skip build script
This commit is contained in:
parent
dca26e2122
commit
00d7dfcbbf
|
|
@ -24,7 +24,7 @@ services:
|
|||
echo "This is a new branch"
|
||||
elif ! git diff --name-only "$TRAVIS_COMMIT_RANGE" -- &> /dev/null; then
|
||||
echo "Change range not recognized: '$TRAVIS_COMMIT_RANGE'"
|
||||
elif git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "^$Dockerfile"; then
|
||||
elif git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "^$Dockerfile$"; then
|
||||
echo "Change of $Dockerfile detected."
|
||||
else
|
||||
echo "Skip build of $Dockerfile as it's not changed."
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ services:
|
|||
echo "This is a new branch"
|
||||
elif ! git diff --name-only "$TRAVIS_COMMIT_RANGE" -- &> /dev/null; then
|
||||
echo "Change range not recognized: '$TRAVIS_COMMIT_RANGE'"
|
||||
elif git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "^$Dockerfile"; then
|
||||
elif git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "^$Dockerfile$"; then
|
||||
echo "Change of $Dockerfile detected."
|
||||
else
|
||||
echo "Skip build of $Dockerfile as it's not changed."
|
||||
|
|
|
|||
Loading…
Reference in New Issue