mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 09:47:35 +08:00
Add a helper script to get the latest artifact from CircleCI
This commit is contained in:
15
scripts/install_latest_artifact.sh
Executable file
15
scripts/install_latest_artifact.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
BUILD_NUM=`curl -s 'https://circleci.com/api/v1.1/project/github/GitJournal/GitJournal?limit=1&offset=0&filter=completed' | 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.apk"
|
||||||
|
|
||||||
|
echo "Downloading $URL"
|
||||||
|
curl "$URL" -o "$APK_LOCATION"
|
||||||
|
|
||||||
|
adb uninstall io.gitjournal.gitjournal
|
||||||
|
adb install -r "$APK_LOCATION"
|
Reference in New Issue
Block a user