Fix script version not considered for tagging

This commit is contained in:
Davide De Rosa 2023-12-16 12:24:51 +01:00
parent 0c8b35f075
commit ccae2a7ebc
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
1 changed files with 3 additions and 3 deletions

View File

@ -1,16 +1,16 @@
#!/bin/bash
function get_openssl_version() {
local std_version=$1
local script_version=${2:-}
script_version="$(printf '%02d' $script_version)"
if [[ ! "$std_version" =~ 3.*.* ]]; then
local script_version=${2:-}
local generic_version=${std_version%?}
local subpatch=${std_version: -1}
local subpatch_number=$(($(printf '%d' \'$subpatch) - 97 + 1))
subpatch_number="$(printf '%02d' $subpatch_number)"
script_version="$(printf '%02d' $script_version)"
local normalized_version="${generic_version}${subpatch_number}${script_version}"
echo $normalized_version
return
fi
echo $std_version
echo "${std_version}${script_version}"
}