Skip to content

Commit

Permalink
Merge pull request nodejs#974 from PeterDaveHello/update-travis-ci
Browse files Browse the repository at this point in the history
Update Travis CI deploy(auto PR) job
  • Loading branch information
LaurentGoderre authored Feb 20, 2019
2 parents 9e126c9 + b78b012 commit 329b23f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ jobs:
- git diff --stat --exit-code .travis.yml

- stage: Deploy
script:
before_script:
- |
if [ "false" != "$TRAVIS_PULL_REQUEST" ]; then
TRAVIS_COMMIT_RANGE="$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA"
if ! git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "Dockerfile$"; then
echo "Skip deployment as none of the Dockerfiles has been changed."
exit
fi
script:
- ./generate-stackbrew-pr.sh "$TRAVIS_COMMIT_RANGE"

# Docker Build #
Expand Down
8 changes: 5 additions & 3 deletions travis.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ jobs:
- git diff --stat --exit-code .travis.yml

- stage: Deploy
script:
before_script:
- |
if [ "false" != "$TRAVIS_PULL_REQUEST" ]; then
TRAVIS_COMMIT_RANGE="$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA"
if ! git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "Dockerfile$"; then
echo "Skip deployment as none of the Dockerfiles has been changed."
exit
fi
script:
- ./generate-stackbrew-pr.sh "$TRAVIS_COMMIT_RANGE"

# Docker Build #

0 comments on commit 329b23f

Please sign in to comment.