summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2025-07-07 15:02:26 +0200
committerAlbin <albin@mullvad.net>2025-07-07 15:13:02 +0200
commitad6aed0e6d5f8c7c3c7c113cae5a48a5fe8b2cb7 (patch)
treefe5a75eed0b7bbf71466327ba594ea91c5a9f570 /android
parente13e4befaf75a4905e66dab36251b7843cfdbd0e (diff)
downloadmullvadvpn-ad6aed0e6d5f8c7c3c7c113cae5a48a5fe8b2cb7.tar.xz
mullvadvpn-ad6aed0e6d5f8c7c3c7c113cae5a48a5fe8b2cb7.zip
Limit dirty working dir check to release builds
Instead of applying to all builds, the check is now limited to release builds. This is necessary since files and directories are removed as part of building for F-Droid. It might also be useful for debug builds.
Diffstat (limited to 'android')
-rwxr-xr-xandroid/build.sh22
1 files changed, 11 insertions, 11 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)