Fix release check on build script
@@ -8,8 +8,6 @@ init_emulator () {
adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
}
-DEPLOY_COMMAND="[ci deploy]"
-
# get current directory name
BASEDIR=`dirname $0`
# assumes that next gradle commands will execute in basedir/..
@@ -18,8 +16,7 @@ BASEDIR=`dirname $0`
command pushd "$BASEDIR/.." > /dev/null
# Get last 2 commit messages (1 is the merge, second last real commit) in a variable
-if [ $TRAVIS_PULL_REQUEST != "false" ]
-then
+if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
LAST_GIT_COMMIT=$(git log -2 --pretty=%B)
BRANCH_TO_TAG=$TRAVIS_PULL_REQUEST_BRANCH
else
@@ -27,8 +24,7 @@ else
BRANCH_TO_TAG=$TRAVIS_BRANCH
fi
-if [[ $LAST_GIT_COMMIT == *$DEPLOY_COMMAND* ]] && [[ $BRANCH_TO_TAG == "release/"* ]]
-then
+if [[ "$LAST_GIT_COMMIT" == *"[ci deploy]"* && "$BRANCH_TO_TAG" == "release/"* ]]; then
init_emulator
# Load properties
. gradle.properties
