Skip to content

Commit 58e940d

Browse files
committed
feat: enable -x/use correct branches
1 parent af93250 commit 58e940d

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- image: circleci/node:10.11.0
2424
steps:
2525
- checkout
26-
- run: sh scripts/deploy.sh
26+
- run: sh -x scripts/deploy.sh
2727

2828
workflows:
2929
version: 2

scripts/deploy.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
# $FIREBASE_DEPLOY_TOKEN, $FIREBASE_PROJECT_ID, $FIREBASE_DEPLOY_TOKEN_STAGING, $FIREBASE_PROJECT_ID_STAGING are present in CircleCI
66
# $deploy_location is an environment variable set when the job is triggered by one of the two repositories getting pushed
77

8-
deploy_location='staging'
9-
10-
if [ "${deploy_location:=master}" = 'master' ]; then # https://stackoverflow.com/a/2013589/3482533
8+
if [ "${deploy_location:=staging}" = 'master' ]; then # https://stackoverflow.com/a/2013589/3482533
119
TOKEN=${FIREBASE_DEPLOY_TOKEN}
1210
PROJECT=${FIREBASE_PROJECT_ID}
1311
elif [ "${deploy_location}" = 'staging' ]; then
@@ -17,8 +15,6 @@ fi
1715

1816
mkdir -p public
1917

20-
deploy_location='master'
21-
2218
# Get stored artifacts from api-data and unpack into the 'public' directory
2319
wget -O '_gen.tar.gz' --no-check-certificate "$(curl -s https://circleci.com/api/v1.1/project/github/PokeAPI/api-data/latest/artifacts?branch=${deploy_location} | jq -r .[0].url)"
2420
tar xzf _gen.tar.gz -C public

0 commit comments

Comments
 (0)