We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bae8240 commit 4721b85Copy full SHA for 4721b85
hack/scripts/gen-ver.sh
@@ -24,6 +24,16 @@ version=$(git -C "${srcdir}" describe --match 'v[0-9]*' --always --tags)
24
commit="$(git --git-dir "${srcdir}/.git" rev-parse HEAD)"
25
commitShort=${commit:0:7}
26
27
+# Handle prefixed version formats
28
+# cmd/cli/v0.1.44 -> v0.1.44
29
+if [[ "$version" =~ .*/v[0-9] ]]; then
30
+ version="${version##*/}"
31
+fi
32
+# docker-v29.0.0 -> v29.0.0
33
+if [[ "$version" =~ ^docker-v[0-9] ]]; then
34
+ version="${version#docker-}"
35
36
+
37
# rpm "Release:" field ($rpmRelease) is used to set the "_release" macro, which
38
# is an incremental number for builds of the same release (Version: / #rpmVersion).
39
#
0 commit comments