summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-10-18 15:35:31 +0200
committerAlbin <albin@mullvad.net>2023-10-19 20:53:57 +0200
commit5041ed90f5c3af0f168c79c2b6da0a66ce72cf12 (patch)
tree9337f7518a862df53d94b4d225c040132d573e62
parent581943e9e40fa7f60e2107a4144a1f63cf266d89 (diff)
downloadmullvadvpn-5041ed90f5c3af0f168c79c2b6da0a66ce72cf12.tar.xz
mullvadvpn-5041ed90f5c3af0f168c79c2b6da0a66ce72cf12.zip
Simplify android build script tag logic
-rwxr-xr-xci/buildserver-build-android.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/ci/buildserver-build-android.sh b/ci/buildserver-build-android.sh
index f9321fe83d..781511025e 100755
--- a/ci/buildserver-build-android.sh
+++ b/ci/buildserver-build-android.sh
@@ -96,21 +96,19 @@ function build_ref {
# If there is a tag for this commit then we append that to the produced artifacts
# A version suffix should only be created if there is a tag for this commit and it is not a release build
- if [[ -n "$tag" ]]; then
+ if [[ -n "$tag" && $version == *"-dev-"* ]]; then
# Replace disallowed version characters in the tag with hyphens
version_suffix="+${tag//[^0-9a-z_-]/-}"
# Will only match paths that include *-dev-* which means release builds will not be included
# Pipes all matching names and their new name to mv
pushd "$artifact_dir"
- for original_file in MullvadVPN-*-dev-*{.apk,.aab}; do
+ for original_file in MullvadVPN-*{.apk,.aab}; do
new_file=$(echo "$original_file" | sed -nE "s/^(MullvadVPN-$version)(.*\.apk|.*\.aab)$/\1$version_suffix\2/p")
mv "$original_file" "$new_file"
done
popd
- if [[ $version == *"-dev-"* ]]; then
- version="$version$version_suffix"
- fi
+ version="$version$version_suffix"
fi
(cd "$artifact_dir" && upload "$version") || return 1