diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2020-09-08 15:04:48 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2020-09-08 15:04:48 +0200 |
| commit | 4b5c7aba3970b1d673013458bdf0ffdd34c78a5c (patch) | |
| tree | e7eee18a6a15220d020bc40158ea2d3877f89eed | |
| parent | 5c989dc8032ba1be83678ae4fb61fa8e0b2eb501 (diff) | |
| download | mullvadvpn-4b5c7aba3970b1d673013458bdf0ffdd34c78a5c.tar.xz mullvadvpn-4b5c7aba3970b1d673013458bdf0ffdd34c78a5c.zip | |
Allow build[-apk].sh to work even when release tag does not exist
| -rwxr-xr-x | build-apk.sh | 2 | ||||
| -rwxr-xr-x | build.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/build-apk.sh b/build-apk.sh index 5cb63d6c13..764f3a8de2 100755 --- a/build-apk.sh +++ b/build-apk.sh @@ -47,7 +47,7 @@ if [[ "$GRADLE_BUILD_TYPE" == "release" ]]; then fi fi -product_version_commit_hash=$(git rev-parse android/$PRODUCT_VERSION^{commit}) +product_version_commit_hash=$(git rev-parse android/$PRODUCT_VERSION^{commit} || echo "") current_head_commit_hash=$(git rev-parse HEAD^{commit}) if [[ "$BUILD_TYPE" == "debug" || $product_version_commit_hash != $current_head_commit_hash ]]; then PRODUCT_VERSION="${PRODUCT_VERSION}-dev-${current_head_commit_hash:0:6}" @@ -62,7 +62,7 @@ else export CSC_IDENTITY_AUTO_DISCOVERY=false fi -product_version_commit_hash=$(git rev-parse $PRODUCT_VERSION^{commit}) +product_version_commit_hash=$(git rev-parse $PRODUCT_VERSION^{commit} || echo "") current_head_commit_hash=$(git rev-parse HEAD^{commit}) if [[ "$BUILD_MODE" == "dev" || $product_version_commit_hash != $current_head_commit_hash ]]; then PRODUCT_VERSION="$PRODUCT_VERSION-dev-${current_head_commit_hash:0:6}" |
