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 - name: get product version
id: get-product-version id: get-product-version
run: | run: |
IFS="-"; OUTPUT=$(build-support/scripts/version.sh -r); CONSUL_VERSION=$(build-support/scripts/version.sh -r)
read -a V <<< "$OUTPUT"; unset IFS; ## TODO: This assumes `make version` outputs 1.1.1+ent-prerel
IFS="+" read VERSION _other <<< "$CONSUL_VERSION"
VERSION=${V[0]} IFS="-" read _other PREREL_VERSION <<< "$CONSUL_VERSION"
PREREL_VERSION=${V[1]} ## TODO: this assumes `version.sh` outputs in the expected ordering of
## [version]+ent{-prerelease} If we need to transition to
echo "::set-output name=product-version::${VERSION}-${PREREL_VERSION}" ## [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=pre-version::${PREREL_VERSION}"
echo "::set-output name=pkg-version::${VERSION}" echo "::set-output name=pkg-version::${VERSION}"