Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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;
echo "Building assets for development.";
gulp build --no-watch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment