summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild-apk.sh2
-rwxr-xr-xbuild.sh2
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}"
diff --git a/build.sh b/build.sh
index 51ee713581..d2fc90c492 100755
--- a/build.sh
+++ b/build.sh
@@ -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}"