aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci_deploy.sh
diff options
context:
space:
mode:
authorMenny Even Danan <menny@evendanan.net>2016-12-25 04:52:48 +0000
committerMenny Even Danan <menny@evendanan.net>2016-12-25 05:13:19 +0000
commit557644910b601218d527728f146593f02b85bfb1 (patch)
tree7c0fb7b4a2a17c79222fe7999e73a55018822917 /scripts/ci_deploy.sh
parentc1af14e36c9fcc686a0211631cc778f58a6c61a2 (diff)
downloadAnySoftKeyboard-557644910b601218d527728f146593f02b85bfb1.tar.gz
AnySoftKeyboard-557644910b601218d527728f146593f02b85bfb1.tar.bz2
ensuring that deploy is only after a PR merge
Diffstat (limited to 'scripts/ci_deploy.sh')
-rwxr-xr-xscripts/ci_deploy.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/ci_deploy.sh b/scripts/ci_deploy.sh
index 5d4d5b99d..0ea46eb3f 100755
--- a/scripts/ci_deploy.sh
+++ b/scripts/ci_deploy.sh
@@ -13,7 +13,13 @@ if [ -z "${PUBLISH_CERT_FILE_URL}" ]; then
exit 1
fi
-#checking last two commits, to see if they include DEPLOY directive
+IS_MERGE_COMMIT=$(git log -1 --pretty=%s | grep -e "^Merge pull request #[1-9]")
+
+if [ -z ${IS_MERGE_COMMIT} ]; then
+ echo "Not a merge commit. I will only deploy a merged PR."
+ exit 0
+fi
+
REQUEST_TO_DEPLOY_RELEASE=$(git log -2 --pretty=%s | grep -e "^DEPLOY-RELEASE")
REQUEST_TO_DEPLOY_CANARY=$(git log -2 --pretty=%s | grep -e "^DEPLOY-CANARY")
BUILD_TYPE=""