DROID-2036 App | Tech | Script for downloading custom MW builds (#800)
This commit is contained in:
parent
f965e4aed3
commit
c0a76ad36e
8
Makefile
8
Makefile
|
@ -34,8 +34,14 @@ setup_local_mw:
|
|||
download_mw_artefacts:
|
||||
./scripts/mw/update-mw.sh
|
||||
|
||||
download_mw_artefacts_custom:
|
||||
./scripts/mw/update-mw-custom.sh
|
||||
|
||||
normalize_mw_imports:
|
||||
./scripts/mw/normalize-imports.sh
|
||||
|
||||
# Update mw when new release is ready
|
||||
update_mw: download_mw_artefacts normalize_mw_imports
|
||||
update_mw: download_mw_artefacts normalize_mw_imports
|
||||
|
||||
# Update mw from custom build (download only library, you have to update your proto files manually)
|
||||
update_mw_custom: download_mw_artefacts_custom
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
REPO="anyproto/anytype-heart"
|
||||
FILE="lib.aar"
|
||||
|
||||
echo "Enter custom MW build name:"
|
||||
|
||||
read -r MW_VERSION
|
||||
|
||||
if [ "$MW_VERSION" = "" ]; then
|
||||
echo "ERROR: mw version is empty"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
echo "Enter your github token (you probably have in github.properties file in the project root folder):"
|
||||
|
||||
read -r GITHUB_TOKEN
|
||||
|
||||
if [ "$GITHUB_TOKEN" = "" ]; then
|
||||
echo "ERROR: github token is empty"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
URL="https://maven.pkg.github.com/anyproto/anytype-heart/io.anyproto/anytype-heart-android/${MW_VERSION}/anytype-heart-android-${MW_VERSION}.aar"
|
||||
|
||||
echo
|
||||
|
||||
echo "Downloading URL: $URL"
|
||||
|
||||
echo
|
||||
|
||||
curl "${URL}" \
|
||||
-H "Authorization: Bearer $GITHUB_TOKEN" -L --fail > $FILE
|
||||
|
||||
if [ "$?" -gt 0 ]
|
||||
then
|
||||
echo
|
||||
echo "Error downloading file. Exiting."
|
||||
exit
|
||||
fi
|
||||
echo
|
||||
echo "Done downloading!"
|
||||
|
||||
echo
|
||||
|
||||
mv lib.aar libs/
|
||||
|
||||
echo "What you need to do next:"
|
||||
echo
|
||||
echo "1. Make sure to update mw version with your custom build version in libs.versions.toml!"
|
||||
echo "2. Make sure to update custom proto files!"
|
||||
echo "3. Make sure to run make setup_local_mw in your terminal!"
|
||||
echo
|
||||
echo "Script finished."
|
Loading…
Reference in New Issue