Update product version extraction for CRT (#11843)

This commit is contained in:
Evan Culver 2021-12-14 16:11:16 -08:00 committed by GitHub
parent 2ef580f952
commit c6dd08f675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -21,13 +21,15 @@ jobs:
- name: get product version
id: get-product-version
run: |
IFS="-"; OUTPUT=$(build-support/scripts/version.sh -r);
read -a V <<< "$OUTPUT"; unset IFS;
VERSION=${V[0]}
PREREL_VERSION=${V[1]}
echo "::set-output name=product-version::${VERSION}-${PREREL_VERSION}"
CONSUL_VERSION=$(build-support/scripts/version.sh -r)
## TODO: This assumes `make version` outputs 1.1.1+ent-prerel
IFS="+" read VERSION _other <<< "$CONSUL_VERSION"
IFS="-" read _other PREREL_VERSION <<< "$CONSUL_VERSION"
## TODO: this assumes `version.sh` outputs in the expected ordering of
## [version]+ent{-prerelease} If we need to transition to
## [version]{-prerelease}+ent before then, we'll need to add
## logic to handle presense/absence of the prerelease
echo "::set-output name=product-version::${CONSUL_VERSION}"
echo "::set-output name=pre-version::${PREREL_VERSION}"
echo "::set-output name=pkg-version::${VERSION}"