diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 55c57080821..4a1d62215b8 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -44,7 +44,7 @@ jobs: - name: Extract GNU version from build-gnu.sh id: gnu-version run: | - GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2) + GNU_VERSION=$(grep '^release_tag_GNU_default=' uutils/util/build-gnu.sh | cut -d'"' -f2) if [ -z "$GNU_VERSION" ]; then echo "Error: Failed to extract GNU version from build-gnu.sh" exit 1 @@ -180,7 +180,7 @@ jobs: - name: Extract GNU version from build-gnu.sh id: gnu-version-selinux run: | - GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2) + GNU_VERSION=$(grep '^release_tag_GNU_default=' uutils/util/build-gnu.sh | cut -d'"' -f2) if [ -z "$GNU_VERSION" ]; then echo "Error: Failed to extract GNU version from build-gnu.sh" exit 1 diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 532e905929d..3b5fa1d3c93 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -34,7 +34,9 @@ path_GNU="$("${READLINK}" -fm -- "${path_GNU:-${path_UUTILS}/../gnu}")" ### -release_tag_GNU="v9.9" +# Allow to run with any tags and commits +release_tag_GNU_default="v9.9" +: ${release_tag_GNU:="${release_tag_GNU_default}"} # check if the GNU coreutils has been cloned, if not print instructions # note: the ${path_GNU} might already exist, so we check for the .git directory @@ -45,7 +47,7 @@ if test ! -d "${path_GNU}/.git"; then echo "Afterwards, checkout the latest release tag:" echo " cd \"${path_GNU}\"" echo " git fetch --all --tags" - echo " git checkout tags/${release_tag_GNU}" + echo " git checkout ${release_tag_GNU}" exit 1 fi