Created
January 30, 2018 19:20
-
-
Save kevinquillen/7e9019120485765d29ccc05c7c61c43d to your computer and use it in GitHub Desktop.
Detect branch being built with TravisCI and and use different gulp parameters depending on where the deployment is going.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
branch=`echo ${TRAVIS_BRANCH}`; | |
if [ $branch = "master" ]; then | |
echo "Building assets for production."; | |
gulp build --env production; | |
else | |
echo "Building assets for development."; | |
gulp build --no-watch; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment