Skip to content

Commit 284a38a

Browse files
build: Accept version numbers with prereleases containing dashes
Previously we'd discard everything after the second dash.
1 parent 096f0dc commit 284a38a

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,11 @@ jobs:
7777
# Split off the build metadata part, if any
7878
# (we won't actually include it in our final version, and handle it only for
7979
# compleness against semver syntax.)
80-
IFS='+' read -ra BUILD_METADATA_PARTS <<< "$VERSION"
81-
VERSION="${BUILD_METADATA_PARTS[0]}"
82-
BUILD_META="${BUILD_METADATA_PARTS[1]}"
80+
IFS='+' read -ra VERSION BUILD_META <<< "$VERSION"
8381
8482
# Separate out the prerelease part, if any
8583
# (version.go expects it to be in a separate variable)
86-
IFS='-' read -ra PRERELEASE_PARTS <<< "$VERSION"
87-
BASE_VERSION="${PRERELEASE_PARTS[0]}"
88-
PRERELEASE="${PRERELEASE_PARTS[1]}"
84+
IFS='-' read -r BASE_VERSION PRERELEASE <<< "$VERSION"
8985
9086
EXPERIMENTS_ENABLED=0
9187
if [[ "$PRERELEASE" == alpha* ]]; then

0 commit comments

Comments
 (0)