install_latest_artifact: Make it work again

We now have 2 artifacts the aab and apk
This commit is contained in:
Vishesh Handa
2019-10-04 04:18:24 +02:00
parent 6fe0886c36
commit 36bd074d84

View File

@ -5,8 +5,8 @@ set -eu
BUILD_NUM=`curl -s 'https://circleci.com/api/v1.1/project/github/GitJournal/GitJournal?limit=1&offset=0&filter=successful' | jq .[0] | jq -r .build_num`
echo "CircleCI Buld Number: $BUILD_NUM"
URL=`curl -s https://circleci.com/api/v1.1/project/github/GitJournal/GitJournal/$BUILD_NUM/artifacts | jq .[0] | jq -r .url`
APK_LOCATION="/tmp/gitjournal.aab"
URL=`curl -s https://circleci.com/api/v1.1/project/github/GitJournal/GitJournal/$BUILD_NUM/artifacts | jq .[1] | jq -r .url`
APK_LOCATION="/tmp/gitjournal.apk"
echo "Downloading $URL"
curl "$URL" -o "$APK_LOCATION"