diff options
| -rw-r--r-- | build.gradle | 2 | ||||
| -rwxr-xr-x | scripts/ci_script.sh | 30 |
2 files changed, 24 insertions, 8 deletions
diff --git a/build.gradle b/build.gradle index 226d46b57..57fd27e0c 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0-beta7' + classpath 'com.android.tools.build:gradle:2.0.0-rc1' classpath 'io.fabric.tools:gradle:1.21.4' classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.8" classpath 'com.github.triplet.gradle:play-publisher:1.1.4' diff --git a/scripts/ci_script.sh b/scripts/ci_script.sh index 923ab8f68..84d274ad6 100755 --- a/scripts/ci_script.sh +++ b/scripts/ci_script.sh @@ -9,12 +9,21 @@ fi IS_POST_MERGE=0 if [ "${COMMIT_BRANCH}" == 'master' ]; then - if [ ! -z $KEYSTORE_FILE_URL ]; then + if [ ! -z ${KEYSTORE_FILE_URL} ]; then IS_POST_MERGE=1 fi fi -if [ $IS_POST_MERGE -eq 1 ]; then +REQUEST_TO_DEPLOY_RELEASE=$(git log -1 --pretty=%s | grep -e "^DEPLOY-RELEASE") +REQUEST_TO_DEPLOY_DISABLE=$(git log -1 --pretty=%s | grep -e "^DEPLOY-DISABLE") +DEPLOY_METHOD=1 +if [ ! -z ${REQUEST_TO_DEPLOY_RELEASE} ]; then + DEPLOY_METHOD=2 +elif [ ! -z ${REQUEST_TO_DEPLOY_DISABLE} ]; then + DEPLOY_METHOD=0 +fi + +if [ ${IS_POST_MERGE} -eq 1 ]; then echo "[POST MERGE] Downloading signature files" scripts/download_signing_files.sh fi @@ -24,9 +33,16 @@ echo "Doing commit checks..." ./gradlew jacocoTestReport -if [ $IS_POST_MERGE -eq 1 ]; then - echo "[POST MERGE] Building and deploying CANARY..." - ./gradlew assembleCanary publishCanary - echo "[POST MERGE] Building release and debug..." - ./gradlew assembleDebug assembleRelease +if [ ${IS_POST_MERGE} -eq 1 ]; then + if [ ${DEPLOY_METHOD} -eq 0 ]; then + echo "[POST MERGE] deploy was disable for this commit" + elif [ ${DEPLOY_METHOD} -eq 1 ]; then + echo "[POST MERGE] Building and deploying CANARY (to beta channel)..." + ./gradlew assembleCanary publishCanary + elif [ ${DEPLOY_METHOD} -eq 1 ]; then + echo "[POST MERGE] Building and deploying RELEASE (to beta channel)..." + ./gradlew assembleRelease publishRelease + else + echo "[POST MERGE] unknown DEPLOY_METHOD '${DEPLOY_METHOD}'! Not deploying." + fi fi
\ No newline at end of file |
