-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nitesh
authored and
nitesh
committed
May 30, 2024
1 parent
7a861b5
commit 4fd76b9
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# reactnativecommunity/react-native-android:13.0 | ||
BUILDER_IMAGE="reactnativecommunity/react-native-android@sha256:4ff9c9f80da57c72284900fcfdbd079183e735684c62d7fafd3df50fdb895453" | ||
CONTAINER_NAME="blixt_builder_container" | ||
BLIXT_PATH=/blixt | ||
|
||
docker run --rm -it --name $CONTAINER_NAME -v `pwd`:$BLIXT_PATH $BUILDER_IMAGE bash -c \ | ||
'echo -e "\n\n********************************\n*** Building Blixt...\n********************************\n" && \ | ||
cd /blixt ; yarn install --frozen-lockfile && \ | ||
cd /blixt/android ; ./gradlew app:assembleRelease && \ | ||
echo -e "\n\n********************************\n**** APKs and SHA256 Hashes\n********************************\n" && \ | ||
cd /blixt && \ | ||
for f in android/app/build/outputs/apk/release/*.apk; | ||
do | ||
RENAMED_FILENAME=$(echo $f | sed -e "s/app-/blixt-/" | sed -e "s/-release-unsigned//") | ||
mv $f $RENAMED_FILENAME | ||
sha256sum $RENAMED_FILENAME | ||
done && \ | ||
echo -e "\n" '; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
VERSION=v0.18.0-beta-blixt | ||
|
||
ANDROID_FILE=Lndmobile.aar | ||
|
||
ANDROID_SHA256='c0f8e77da00795a370ef2a1c5ba9d413707c52226c33c2ef1e272007c2f30149' | ||
|
||
FILE_PATH=https://github.com/hsjoberg/lnd/releases/download/$VERSION/ | ||
|
||
ANDROID_LINK=$FILE_PATH$ANDROID_FILE | ||
|
||
# test that curl and unzip are installed | ||
if ! command -v curl &> /dev/null | ||
then | ||
echo "curl could not be found. Please install it and run the script again." | ||
exit | ||
fi | ||
|
||
if ! command -v unzip &> /dev/null | ||
then | ||
echo "unzip could not be found. Please install it and run the script again." | ||
exit | ||
fi | ||
|
||
########### | ||
# Android # | ||
########### | ||
|
||
if ! echo "$ANDROID_SHA256 android/lndmobile/$ANDROID_FILE" | sha256sum -c -; then | ||
echo "Android library file missing or checksum failed" >&2 | ||
|
||
# delete old instance of library file | ||
rm android/lndmobile/$ANDROID_FILE | ||
|
||
# download Android LND library file | ||
curl -L $ANDROID_LINK > android/lndmobile/$ANDROID_FILE | ||
|
||
# check checksum | ||
if ! echo "$ANDROID_SHA256 android/lndmobile/$ANDROID_FILE" | sha256sum -c -; then | ||
echo "Android checksum failed" >&2 | ||
exit 1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters