Skip to content

Commit

Permalink
Merge pull request #679 from DroidKaigi/jmatsu-patch-1
Browse files Browse the repository at this point in the history
Fix decryption failure of publisher key and some bash syntax
  • Loading branch information
jmatsu authored Sep 27, 2018
2 parents 7d6808f + ace8484 commit 5907d37
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,47 @@ jobs:
- run:
name: decrypt keystore
command: |
if [ $CIRCLE_BRANCH = 'master' -o $CIRCLE_BRANCH = 'release' ]; then
openssl aes-256-cbc -k $KEYSTORE_DECRYPT_PASSWORD -d -in encrypted-droidkaigi-key -out release.keystore
if [[ "${CIRCLE_BRANCH:-undefined}" =~ ^(master|release)$ ]]; then
openssl aes-256-cbc -k $KEYSTORE_DECRYPT_PASSWORD -d -in encrypted-droidkaigi-key -out release.keystore -md sha256
fi
- run:
name: decrypt json
command: |
if [ $CIRCLE_BRANCH = 'master' -o $CIRCLE_BRANCH = 'release' ]; then
openssl aes-256-cbc -k $JSON_DECRYPT_PASSWORD -d -in encrypted-google-services.json -out app/google-services.json
if [[ "${CIRCLE_BRANCH:-undefined}" =~ ^(master|release)$ ]]; then
openssl aes-256-cbc -k $JSON_DECRYPT_PASSWORD -d -in encrypted-google-services.json -out app/google-services.json -md sha256
fi
- run:
name: Test
command: |
if [ $CIRCLE_BRANCH = 'master' -o $CIRCLE_BRANCH = 'release' ]; then
if [[ "${CIRCLE_BRANCH:-undefined}" =~ ^(master|release)$ ]]; then
./gradlew --stacktrace testRelease
else
./gradlew --stacktrace test${APP_BUILD_TYPE^}
fi
- run:
name: Build
command: |
if [ $CIRCLE_BRANCH = 'master' -o $CIRCLE_BRANCH = 'release' ]; then
if [[ "${CIRCLE_BRANCH:-undefined}" =~ ^(master|release)$ ]]; then
./gradlew --offline --stacktrace assembleRelease
else
./gradlew --offline --stacktrace assemble${APP_BUILD_TYPE^}
fi
- run:
name: Check
command: |
if [ ! $CIRCLE_BRANCH = 'master' -a ! $CIRCLE_BRANCH = 'release' ]; then
if [[ ! "${CIRCLE_BRANCH:-undefined}" =~ ^(master|release)$ ]]; then
./gradlew --stacktrace lint${APP_BUILD_TYPE^}
./gradlew --stacktrace ktlint${APP_BUILD_TYPE^}Check
bundle exec danger
fi
- run:
name: Deploy
command: |
if [ $CIRCLE_BRANCH = 'master' ]; then
if [[ "${CIRCLE_BRANCH:-undefined}" == 'master' ]]; then
./gradlew :app:uploadDeployGateRelease
elif [[ "${CIRCLE_TAG}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
elif [[ "${CIRCLE_TAG:-undefined}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Deploy to Google Play"
openssl aes-256-cbc -k $PUBLISHER_KEYS_JSON_DECRYPT_PASSWORD -d -in encrypted-publisher-keys.json -out app/publisher-keys.json
openssl aes-256-cbc -k $PUBLISHER_KEYS_JSON_DECRYPT_PASSWORD -d -in encrypted-publisher-keys.json -out app/publisher-keys.json -md md5
./gradlew publishApkRelease
fi
- store_artifacts:
Expand Down

0 comments on commit 5907d37

Please sign in to comment.