summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2025-07-07 15:41:26 +0200
committerAlbin <albin@mullvad.net>2025-07-07 15:41:26 +0200
commit9b4cc0041309f75f28cb6888852aa6b478919267 (patch)
tree4dbd13e80c4868ac42a2892c8d15c77fffb2698e /android
parente13e4befaf75a4905e66dab36251b7843cfdbd0e (diff)
parenta81feb3befa7683255ffc028c9fe5dd1b8c63ace (diff)
downloadmullvadvpn-9b4cc0041309f75f28cb6888852aa6b478919267.tar.xz
mullvadvpn-9b4cc0041309f75f28cb6888852aa6b478919267.zip
Merge branch 'allow-dirty-fdroid-builds'
Diffstat (limited to 'android')
-rwxr-xr-xandroid/build.sh22
-rwxr-xr-xandroid/scripts/prepare-release.sh2
2 files changed, 12 insertions, 12 deletions
diff --git a/android/build.sh b/android/build.sh
index c6c04ac702..516eb69b81 100755
--- a/android/build.sh
+++ b/android/build.sh
@@ -5,17 +5,6 @@ set -eu
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
-if test -n "$(git status --porcelain)"; then
- echo "Dirty working directory! Will not accept that for an official release."
- exit 1
-fi
-
-echo "Computing build version..."
-echo ""
-PRODUCT_VERSION=$(cargo run -q --bin mullvad-version versionName)
-echo "Building Mullvad VPN $PRODUCT_VERSION for Android"
-echo ""
-
GRADLE_BUILD_TYPE="release"
GRADLE_TASKS=(createOssProdReleaseDistApk createPlayProdReleaseDistApk)
BUILD_BUNDLE="no"
@@ -42,6 +31,11 @@ while [ -n "${1:-""}" ]; do
done
if [[ "$GRADLE_BUILD_TYPE" == "release" ]]; then
+ if [[ -n "$(git status --porcelain)" ]]; then
+ echo "Dirty working directory! Will not accept that for an official release."
+ exit 1
+ fi
+
if [ ! -f "$SCRIPT_DIR/credentials/keystore.properties" ]; then
echo "ERROR: No keystore.properties file found" >&2
echo " Please configure the signing keys as described in the README" >&2
@@ -49,6 +43,12 @@ if [[ "$GRADLE_BUILD_TYPE" == "release" ]]; then
fi
fi
+echo "Computing build version..."
+echo ""
+PRODUCT_VERSION=$(cargo run -q --bin mullvad-version versionName)
+echo "Building Mullvad VPN $PRODUCT_VERSION for Android"
+echo ""
+
if [[ "$GRADLE_BUILD_TYPE" == "release" ]]; then
if [[ "$PRODUCT_VERSION" == *"-dev-"* ]]; then
GRADLE_TASKS+=(createPlayDevmoleReleaseDistApk createPlayStagemoleReleaseDistApk)
diff --git a/android/scripts/prepare-release.sh b/android/scripts/prepare-release.sh
index 2bab05fd4c..cc3983d67c 100755
--- a/android/scripts/prepare-release.sh
+++ b/android/scripts/prepare-release.sh
@@ -26,7 +26,7 @@ if [[ -z ${PRODUCT_VERSION+x} ]]; then
exit 1
fi
-if test -n "$(git status --porcelain)"; then
+if [[ -n "$(git status --porcelain)" ]]; then
echo "Dirty working directory! Will not accept that for an official release."
exit 1
fi