make: add release-fdroid and fdroid-nix-dir targets

With these targets added we can simplify the format of the F-Droid YAML
metadata file which defines how to run `status-react` builds.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-02-25 11:45:33 +01:00
parent d0d8815d4a
commit 8376fedb4b
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 20 additions and 7 deletions

View File

@ -156,12 +156,15 @@ keystore: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
keystore: ##@prepare Generate a Keystore for signing Android APKs
@./scripts/generate-keystore.sh
fdroid-nix-dir: ##@prepare Create /nix directory for F-Droid Vagrant builders
mkdir -m 0755 /nix
chown vagrant /nix
#----------------
# Release builds
#----------------
release: release-android release-ios ##@build build release for Android and iOS
release: release-android release-ios ##@build Build release for Android and iOS
release-android: export TARGET := default
release-android: export BUILD_ENV ?= prod
release-android: export BUILD_TYPE ?= nightly
release-android: export BUILD_NUMBER ?= $(TMP_BUILD_NUMBER)
@ -169,12 +172,20 @@ release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
release-android: export ANDROID_APK_SIGNED ?= true
release-android: export ANDROID_ABI_SPLIT ?= false
release-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86
release-android: keystore ##@build build release for Android
release-android: keystore ##@build Build release for Android
scripts/release-android.sh
release-fdroid: export BUILD_ENV ?= prod
release-fdroid: export BUILD_TYPE = release
release-fdroid: export ANDROID_APK_SIGNED = false
release-fdroid: export ANDROID_ABI_SPLIT = false
release-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64
release-fdroid: ##@build Build release for F-Droid
scripts/release-android.sh
release-ios: export TARGET := ios
release-ios: export BUILD_ENV ?= prod
release-ios: watchman-clean ##@build build release for iOS release
release-ios: watchman-clean ##@build Build release for iOS release
@git clean -dxf -f target/ios && \
$(MAKE) jsbundle-ios && \
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Release -destination 'generic/platform=iOS' -UseModernBuildSystem=N clean archive

View File

@ -23,15 +23,17 @@ function append_env_export() {
}
config=''
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
if [[ -n "${STATUS_GO_SRC_OVERRIDE}" ]]; then
config+="status-im.status-go.src-override=\"${STATUS_GO_SRC_OVERRIDE}\";"
fi
if [ -n "${NIMBUS_SRC_OVERRIDE}" ]; then
if [[ -n "${NIMBUS_SRC_OVERRIDE}" ]]; then
config+="status-im.nimbus.src-override=\"${NIMBUS_SRC_OVERRIDE}\";"
fi
if [[ "${ANDROID_APK_SIGNED}" == "true" ]]; then
config+="status-im.android.keystore-path=\"$(must_get_env KEYSTORE_PATH)\";"
fi
config+="status-im.build-type=\"$(must_get_env BUILD_TYPE)\";"
config+="status-im.build-number=\"$(must_get_env BUILD_NUMBER)\";"
config+="status-im.android.keystore-path=\"$(must_get_env KEYSTORE_PATH)\";"
config+="status-im.android.apk-signed=\"$(must_get_env ANDROID_APK_SIGNED)\";"
config+="status-im.android.abi-split=\"$(must_get_env ANDROID_ABI_SPLIT)\";"
config+="status-im.android.abi-include=\"$(must_get_env ANDROID_ABI_INCLUDE)\";"