mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 02:56:07 +00:00
Jakub Sokołowski
b51b565cdb
- remove unused android-ndk toolchains - add build.sh and test target for easy testing of image - separate generic parts into a base image - pass keystore credentials via env variables Signed-off-by: Jakub Sokołowski <jakub@status.im>
37 lines
1.0 KiB
Bash
Executable File
37 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euf
|
|
|
|
TARGET=${1:-debug}
|
|
|
|
CURRENT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
|
. "$CURRENT_DIR/lib/setup/path-support.sh"
|
|
source_lib "output.sh"
|
|
source_lib "properties.sh"
|
|
|
|
cecho "Building @b@green[[${TARGET}]] environment"
|
|
echo
|
|
|
|
GRADLE_PROPERTIES="--daemon --parallel -q -b android/build.gradle"
|
|
|
|
yarn install
|
|
|
|
case $TARGET in
|
|
debug)
|
|
lein do clean, cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleDebug
|
|
echo "Generated android/app/build/outputs/apk/debug/app-debug.apk"
|
|
exit 1
|
|
;;
|
|
release)
|
|
STORE_FILE=$(property_gradle 'STATUS_RELEASE_STORE_FILE')
|
|
[[ ! -e "${STORE_FILE/#\~/$HOME}" ]] && echo "Please generate keystore first using ./generate-keystore.sh" && exit 0
|
|
lein do clean, with-profile prod cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleRelease
|
|
cecho "Generated @b@blueandroid/app/build/outputs/apk/release/app-release.apk"
|
|
echo
|
|
exit
|
|
;;
|
|
*)
|
|
echo "Only debug and release targets are supported"
|
|
exit 1
|
|
esac
|