Only deploy on the master branch

This commit is contained in:
Starbeamrainbowlabs 2019-04-14 21:41:04 +01:00
parent ce258429f6
commit a45001a75f
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

5
build
View file

@ -272,7 +272,10 @@ task_ci() {
tasks_run setup setup-dev tasks_run setup setup-dev
NODE_ENV="production" tasks_run client docs archive; NODE_ENV="production" tasks_run client docs archive;
if [ "${GIT_REF_NAME}" == "refs/heads/master" ]; then latest_commit="$(git log -n 1 --pretty=format:"%H")";
current_commit="$(git rev-parse HEAD)";
if [ "${GIT_REF_NAME}" == "refs/heads/master" ] && [ "${latest_commit}" == "${current_commit}" ]; then
tasks_run deploy; tasks_run deploy;
else else
echo "Not deploying, as this build wasn't on the master branch."; echo "Not deploying, as this build wasn't on the master branch.";