There is no great way to do this right now, but you can write a shell script that checks the Travis environment variable TRAVIS_BRANCH (which returns the branch that Travis is testing) and sets the appropriate environment variables in response. Here is a brief example (note that I am not an expert in shell scripts, so if I screwed up this or did something stupid, let me know and I will fix it):
if [ ${TRAVIS_BRANCH} == development ]; then TEST_MODE=dev stuff else TEST_MODE=master stuff fi export TEST_MODE
joshua-anderson
source share