From f5cfbc898d589cab911c230c9757f96e8425a8e3 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Fri, 16 May 2025 18:32:22 +0200 Subject: [PATCH] Do not check out tag in android-release.yml (#3480) --- .github/scripts/validate-version.sh | 4 +-- .github/workflows/android-release.yml | 10 +------- .../android/scripts/ensure-code-revision.sh | 25 ------------------- 3 files changed, 3 insertions(+), 36 deletions(-) delete mode 100755 platform/android/scripts/ensure-code-revision.sh diff --git a/.github/scripts/validate-version.sh b/.github/scripts/validate-version.sh index 124ee1820..d26707328 100755 --- a/.github/scripts/validate-version.sh +++ b/.github/scripts/validate-version.sh @@ -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 diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 619e8130b..b81f42525 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -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: | diff --git a/platform/android/scripts/ensure-code-revision.sh b/platform/android/scripts/ensure-code-revision.sh deleted file mode 100755 index 921b7136e..000000000 --- a/platform/android/scripts/ensure-code-revision.sh +++ /dev/null @@ -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}