Skip to content

Instantly share code, notes, and snippets.

@kevinquillen
Created January 30, 2018 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinquillen/7e9019120485765d29ccc05c7c61c43d to your computer and use it in GitHub Desktop.
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.
#!/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