mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 05:52:05 +00:00
Make Travis builds skip revert branches
This commit is contained in:
parent
fa85da19a8
commit
af6c8fa4a4
1 changed files with 9 additions and 3 deletions
|
|
@ -16,9 +16,15 @@ function build {
|
||||||
VERSIONED=false npm run web-dist
|
VERSIONED=false npm run web-dist
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only run tests for PRs
|
# For revert branches, do nothing
|
||||||
|
if [[ "$TRAVIS_BRANCH" == revert-* ]]
|
||||||
|
echo -e "\e[36m\e[1mBuild triggered for reversion branch \"$TRAVIS_BRANCH\" - doing nothing."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For PRs, only run tests
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
echo -e "\e[36m\e[1mBuild triggered for PR #$TRAVIS_PULL_REQUEST to branch $TRAVIS_BRANCH - only running tests."
|
echo -e "\e[36m\e[1mBuild triggered for PR #$TRAVIS_PULL_REQUEST to branch \"$TRAVIS_BRANCH\" - only running tests."
|
||||||
tests
|
tests
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -31,7 +37,7 @@ else
|
||||||
SOURCE=$TRAVIS_BRANCH
|
SOURCE=$TRAVIS_BRANCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Only run tests for Node versions other than 6
|
# For Node != 6, only run tests
|
||||||
if [ "$TRAVIS_NODE_VERSION" != "6" ]; then
|
if [ "$TRAVIS_NODE_VERSION" != "6" ]; then
|
||||||
echo -e "\e[36m\e[1mBuild triggered with Node v$TRAVIS_NODE_VERSION - only running tests."
|
echo -e "\e[36m\e[1mBuild triggered with Node v$TRAVIS_NODE_VERSION - only running tests."
|
||||||
tests
|
tests
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue