Skip to content

Instantly share code, notes, and snippets.

Embed
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;
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