diff --git a/Makefile b/Makefile index 327316295c..b433e0bdf9 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/scripts/release-android.sh b/scripts/release-android.sh index ba0d740776..fbe464fba2 100755 --- a/scripts/release-android.sh +++ b/scripts/release-android.sh @@ -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)\";"