Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 1ee2c87

Browse files
committed
build: don't skip master build when only md files have changed
* Equivalent commit to angular/components#9879
1 parent 5ffb39c commit 1ee2c87

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

scripts/ci/travis-testing.sh

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ cd $(dirname $0)/../..
1717
source scripts/ci/sources/mode.sh
1818
source scripts/ci/sources/tunnel.sh
1919

20-
# Get commit diff
21-
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
22-
fileDiff=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
23-
else
20+
# Get the commit diff and skip the build if only .md files have changed.
21+
# Should not apply to master builds.
22+
if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then
2423
fileDiff=$(git diff --name-only $TRAVIS_BRANCH...HEAD)
25-
fi
26-
27-
# Check if tests can be skipped
28-
if [[ ${fileDiff} =~ ^(.*\.md\s*)*$ ]]; then
29-
echo "Skipping tests since only markdown files changed."
30-
exit 0
24+
25+
if [[ ${fileDiff} =~ ^(.*\.md\s*)*$ ]]; then
26+
echo "Skipping tests because only markdown files changed."
27+
exit 0
28+
fi
3129
fi
3230

3331
start_tunnel

0 commit comments

Comments
 (0)