From 284a38a04cfbdf3545e11aee46a9d02b95afffc5 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 19 May 2022 16:51:54 -0700 Subject: [PATCH] build: Accept version numbers with prereleases containing dashes Previously we'd discard everything after the second dash. --- .github/workflows/build.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae88a7fe2687..ee68fec8cac8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,15 +77,11 @@ jobs: # Split off the build metadata part, if any # (we won't actually include it in our final version, and handle it only for # compleness against semver syntax.) - IFS='+' read -ra BUILD_METADATA_PARTS <<< "$VERSION" - VERSION="${BUILD_METADATA_PARTS[0]}" - BUILD_META="${BUILD_METADATA_PARTS[1]}" + IFS='+' read -ra VERSION BUILD_META <<< "$VERSION" # Separate out the prerelease part, if any # (version.go expects it to be in a separate variable) - IFS='-' read -ra PRERELEASE_PARTS <<< "$VERSION" - BASE_VERSION="${PRERELEASE_PARTS[0]}" - PRERELEASE="${PRERELEASE_PARTS[1]}" + IFS='-' read -r BASE_VERSION PRERELEASE <<< "$VERSION" EXPERIMENTS_ENABLED=0 if [[ "$PRERELEASE" == alpha* ]]; then