Skip to content

Commit

Permalink
Use regexp match
Browse files Browse the repository at this point in the history
  • Loading branch information
jmatsu committed Sep 27, 2018
1 parent f6db453 commit ace8484
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,35 @@ jobs:
- run:
name: decrypt keystore
command: |
if [[ "${CIRCLE_BRANCH:-undefined}" == 'master' -o "${CIRCLE_BRANCH:-undefined}" == 'release' ]]; then
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:-undefined}" == 'master' -o "${CIRCLE_BRANCH:-undefined}" == 'release' ]]; then
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:-undefined}" == 'master' -o "${CIRCLE_BRANCH:-undefined}" == '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:-undefined}" == 'master' -o "${CIRCLE_BRANCH:-undefined}" == '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:-undefined}" != 'master' -a "${CIRCLE_BRANCH:-undefined}" != '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
Expand Down

0 comments on commit ace8484

Please sign in to comment.