Files
GitJournal/scripts/install_ndk_libs.sh
Vishesh Handa 77d295077f CI: Download the NDK libs
Now I can finally push all these changes, as the CI should also run and
we're ready to try out the new version of the app which uses libgit2
instead of jgit. Hopefully no user will notice anything different.
2019-05-17 17:17:33 +02:00

24 lines
633 B
Bash
Executable File

#!/usr/bin/env bash
set -eux
cd "$(dirname "$0")"/../android/app
BUILD_NUM=$(curl -s 'https://circleci.com/api/v1.1/project/github/GitJournal/ndk-libraries?limit=1&offset=0&filter=succeeded' | jq .[0] | jq -r .build_num)
echo "CircleCI Buld Number: $BUILD_NUM"
URL=$(curl -s https://circleci.com/api/v1.1/project/github/GitJournal/ndk-libraries/$BUILD_NUM/artifacts | grep -o 'https://[^"]*libs.tar')
echo "Downloading $URL"
curl "$URL" -o "libs.tar"
rm -rf libs
tar xf libs.tar
mv libs ci_libs
mkdir libs
cp -r ci_libs/openssl-lib/* libs/
cp -r ci_libs/libssh2/* libs/
cp -r ci_libs/libgit2/* libs/
rm -rf ci_libs
rm libs.tar