Do not check out tag in android-release.yml (#3480)

This commit is contained in:
Bart Louwers
2025-05-16 18:32:22 +02:00
committed by GitHub
parent b585b0086f
commit f5cfbc898d
3 changed files with 3 additions and 36 deletions

View File

@@ -3,7 +3,7 @@
validate_version() {
local version="$1"
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-pre.*)?$ ]]; then
echo "::error::Invalid version format in VERSION file. Expected: X.Y.Z or X.Y.Z-pre*"
echo "::error::Invalid version '$version' in $(realpath VERSION). Expected: X.Y.Z or X.Y.Z-pre*"
return 1
fi
return 0
@@ -11,7 +11,7 @@ validate_version() {
version=$(cat VERSION 2>/dev/null)
if [ -z "$version" ]; then
echo "::error::VERSION file not found or empty"
echo "::error::No VERSION file found or empty in $PWD"
exit 1
fi

View File

@@ -30,22 +30,14 @@ jobs:
cmakeVersion: 3.24.1
ninjaVersion: latest
- name: Ensure source code revision
run: scripts/ensure-code-revision.sh
working-directory: platform/android
shell: bash
- name: npm install
run: npm install --ignore-scripts
working-directory: platform/android
- name: Android nitpick
run: make run-android-nitpick
- name: Validate and set version
working-directory: platform/android
run: |
../../.github/scripts/validate-version.sh
run: ../../.github/scripts/validate-version.sh
- name: Build package
run: |

View File

@@ -1,25 +0,0 @@
#!/usr/bin/env bash
set -e
set -o pipefail
set -u
function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
function finish { >&2 echo -en "\033[0m"; }
trap finish EXIT
VERSION_TAG=${VERSION_TAG:-''}
if [[ -z ${VERSION_TAG} ]]; then
step "Determining version number from most recent relevant git tag…"
VERSION_TAG=$( git describe --tags --match=android-v*.*.* --abbrev=0 )
echo "Found tag: ${VERSION_TAG}"
fi
if [[ $( echo ${VERSION_TAG} | grep --invert-match android-v ) ]]; then
echo "Error: ${VERSION_TAG} is not a valid android version tag"
echo "VERSION_TAG should be in format: android-vX.X.X-pre.X"
exit 1
fi
step "Checking out source code at ${VERSION_TAG}"
git checkout ${VERSION_TAG}