Skip to content

Commit a082db6

Browse files
committed
chore: fix typo/run wget quietly
1 parent 3f242df commit a082db6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Runs in CircleCI
44
# Deploys both pokeapi.co and api-data to Firebase in the respective project
55
# $FIREBASE_DEPLOY_TOKEN, $FIREBASE_PROJECT_ID, $FIREBASE_DEPLOY_TOKEN_STAGING, $FIREBASE_PROJECT_ID_STAGING are present in CircleCI
6-
# $deploy_location is an environment variable set when the job is triggered by one of the two repositories getting pushed. If not present then the deploy was triggered by a commit on the master of staging branch of this very repository.
6+
# $deploy_location is an environment variable set when the job is triggered by one of the two repositories getting pushed. If not present then the deploy was triggered by a commit on the master or staging branch of this very repository.
77

88
if [ "${deploy_location:=$CIRCLE_BRANCH}" = 'master' ]; then # bash parameter expansion (assign default value)
99
echo 'Deploying master branches of PokeAPI/api-data and PokeAPI/pokeapi.co to https://pokeapi.co'
@@ -18,15 +18,15 @@ fi
1818
mkdir -p public
1919

2020
# Get stored artifacts from api-data and unpack into the 'public' directory
21-
wget -O '_gen.tar.gz' "$(curl -s https://circleci.com/api/v1.1/project/github/PokeAPI/api-data/latest/artifacts?branch=${deploy_location} | jq -r .[0].url)"
21+
wget -q -O '_gen.tar.gz' "$(curl -s https://circleci.com/api/v1.1/project/github/PokeAPI/api-data/latest/artifacts?branch="${deploy_location}" | jq -r .[0].url)"
2222
if [ $? -ne 0 ]; then
2323
echo "Couldn't find the latest api-data .tar.gz for the branch ${deploy_location}"
2424
exit 1
2525
fi
2626
tar xzf _gen.tar.gz -C public
2727

2828
# Get stored artifacts from pokeapi.co and unpack into the current directory
29-
wget -O 'static_website.tar.gz' "$(curl -s https://circleci.com/api/v1.1/project/github/PokeAPI/pokeapi.co/latest/artifacts?branch=${deploy_location} | jq -r .[0].url)"
29+
wget -q -O 'static_website.tar.gz' "$(curl -s https://circleci.com/api/v1.1/project/github/PokeAPI/pokeapi.co/latest/artifacts?branch="${deploy_location}" | jq -r .[0].url)"
3030
if [ $? -ne 0 ]; then
3131
echo "Couldn't find the latest pokeapi.co website .tar.gz for the branch ${deploy_location}"
3232
exit 1

0 commit comments

Comments
 (0)