Wave 3 (#3): tolerate zero previous tags in versionCode check
This commit is contained in:
1 parent
ed769b0c4a
commit
25d43a7702
1 file changed
+1
-1
@@ -127,7 +127,7 @@ jobs:
|
||||
# so a tag without a bump would strand users on the old build.
|
||||
run: |
|
||||
CUR=$(grep -oE 'versionCode [0-9]+' android/app/build.gradle | grep -oE '[0-9]+' | head -1)
|
||||
PREV_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -2 | tail -1)
|
||||
PREV_TAG=$(git tag --sort=-v:refname 2>/dev/null | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -2 | tail -1 || true)
|
||||
if [ -n "$PREV_TAG" ]; then
|
||||
PREV=$(git show "$PREV_TAG:android/app/build.gradle" | grep -oE 'versionCode [0-9]+' | grep -oE '[0-9]+' | head -1)
|
||||
echo "versionCode: $PREV ($PREV_TAG) -> $CUR (${GITHUB_REF_NAME})"
|
||||
|
||||
Reference in new issue
Block a user