2016-03-03 17:21:24 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e;
|
|
|
|
|
2016-06-23 16:23:53 +02:00
|
|
|
##
|
|
|
|
## check for pull request against master
|
|
|
|
##
|
|
|
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
|
|
|
|
|
|
|
|
gulp deploy --beta;
|
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## check for master push which is no pull request
|
|
|
|
##
|
|
|
|
elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
|
|
|
|
|
|
|
gulp deploy --live;
|
|
|
|
|
2016-03-03 17:46:59 +01:00
|
|
|
else
|
2016-06-23 16:23:53 +02:00
|
|
|
|
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo " ✓ nothing to deploy "
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
2016-03-03 17:21:24 +01:00
|
|
|
fi;
|
|
|
|
|
2016-06-23 16:23:53 +02:00
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo " ✓ done deployment "
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
2016-03-03 17:21:24 +01:00
|
|
|
exit;
|