Skip to content

Commit

Permalink
scripts: use 'v' version prefix in binaries, too.
Browse files Browse the repository at this point in the history
To be more consistent, include a 'v' version prefix in the
version strings linked into binaries.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Oct 16, 2023
1 parent a32b7ef commit c300630
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/build/get-buildid
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ dotgit_version() {
fi

case "$_v" in
v*) _v="${_v#v}"
;;
v*) ;;
*)
_count=$(git rev-list --count HEAD)
_v="0.0.0-$_count-g$_id$_dirty"
_v="v0.0.0-$_count-g$_id$_dirty"
;;
esac

Expand Down Expand Up @@ -127,7 +126,7 @@ unknown_version() {

package_versions() {
case "$VERSION" in
[0-9.]**-g[0-9a-f]*)
v[0-9.]**-g[0-9a-f]*)
local _full="$VERSION"
local _numeric=${_full%%-*}
local _cntsha1=${_full#*-}
Expand All @@ -143,7 +142,7 @@ package_versions() {
RPM=$(echo "$VERSION" | tr '+-' '_')
DEB=$VERSION
;;
[0-9.]*)
v[0-9.]*)
RPM=$VERSION
DEB=$VERSION
;;
Expand Down

0 comments on commit c300630

Please sign in to comment.