diff --git a/scripts/prep-key.sh b/scripts/prep-key.sh index 53ac93ffd..de8b1147d 100644 --- a/scripts/prep-key.sh +++ b/scripts/prep-key.sh @@ -3,7 +3,7 @@ set -e export DEPLOY_BRANCH=${DEPLOY_BRANCH:-master} -if [[ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "fossasia/badge-magic-android" -o "$TRAVIS_BRANCH" != "$DEPLOY_BRANCH" ]]; then +if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "fossasia/badge-magic-android" -o "$TRAVIS_BRANCH" != "$DEPLOY_BRANCH" ]; then echo "We decrypt key only for pushes to the master branch and not PRs. So, skip." exit 0 fi diff --git a/scripts/upload-apk.sh b/scripts/upload-apk.sh index 3409ce8b9..a08291a95 100644 --- a/scripts/upload-apk.sh +++ b/scripts/upload-apk.sh @@ -7,7 +7,7 @@ git config --global user.email "noreply+travis@fossasia.org" export DEPLOY_BRANCH=${DEPLOY_BRANCH:-development} export PUBLISH_BRANCH=${PUBLISH_BRANCH:-master} -if [[ "$TRAVIS_PULL_REQUEST" != "false" || "$TRAVIS_REPO_SLUG" != "fossasia/badge-magic-android" ]] || ! [[ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" || "$TRAVIS_BRANCH" == "$PUBLISH_BRANCH" ]]; then +if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "fossasia/badge-magic-android" ] || ! [ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" -o "$TRAVIS_BRANCH" == "$PUBLISH_BRANCH" ]; then echo "We upload apk only for changes in development or master, and not PRs. So, let's skip this shall we ? :)" exit 0 fi