diff options
author | Richard Levitte <levitte@openssl.org> | 2022-12-02 06:59:58 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-12-08 07:01:33 +0100 |
commit | 83a5bd80708adc6726deac390e405a7b50dec540 (patch) | |
tree | 72a13ba040999fec92a409f00dc3049518edd681 /dev/release-aux | |
parent | 084d3afd26cc20b41241b70b6c709b76d2a334a5 (diff) |
Fix treatment of BUILD_METADATA
According to documentation [^1], the BUILD_METADATA from VERSION.dat should
be prefixed with a plus sign when used. It is given this treatment in
Configure, but not in all other scripts that use VERSION.dat directly.
This change fixes that.
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/19815)
Diffstat (limited to 'dev/release-aux')
-rw-r--r-- | dev/release-aux/release-version-fn.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dev/release-aux/release-version-fn.sh b/dev/release-aux/release-version-fn.sh index e9e1ac3850..b924fad8c0 100644 --- a/dev/release-aux/release-version-fn.sh +++ b/dev/release-aux/release-version-fn.sh @@ -54,6 +54,9 @@ get_version () { -e 's|^dev$|0|' \ -e 's|^alpha([0-9]+)(-(dev))?$|\1|' \ -e 's|^beta([0-9]+)(-(dev))?$|\1|' ) + _BUILD_METADATA='' + if [ -n "$PRE_RELEASE_TAG" ]; then _PRE_RELEASE_TAG="-${PRE_RELEASE_TAG}"; fi + if [ -n "$BUILD_METADATA" ]; then _BUILD_METADATA="+${BUILD_METADATA}"; fi } # $1 is one of "alpha", "beta", "final", "", or "minor" @@ -102,6 +105,7 @@ set_version () { PRE_RELEASE_TAG="$PRE_LABEL$PRE_NUM" ;; esac + if [ -n "$PRE_RELEASE_TAG" ]; then _PRE_RELEASE_TAG="-${PRE_RELEASE_TAG}"; fi cat > "$SOURCEDIR/VERSION.dat" <<EOF MAJOR=$MAJOR MINOR=$MINOR |