hack/make: Strip "v" tag prefix name from VERSION

To make the version format in the `moby-bin` consistent with the
version we use in the release pipeline.

```diff
Server: Docker Engine - Community
 Engine:
-  Version:          v25.0.0
+  Version:          25.0.0
...
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2024-01-05 13:17:47 +01:00
parent c3c1ee0150
commit 9a5393d500
No known key found for this signature in database
GPG key ID: B85EFCFE26DEF92A

View file

@ -39,7 +39,9 @@ DEFAULT_BUNDLES=(
)
VERSION=${VERSION:-dev}
if [[ $VERSION == refs/tags/* ]]; then
if [[ $VERSION == refs/tags/v* ]]; then
VERSION=${VERSION#refs/tags/v}
else if [[ $VERSION == refs/tags/* ]]; then
VERSION=${VERSION#refs/tags/}
elif [[ $VERSION == refs/heads/* ]]; then
VERSION=$(sed <<< "${VERSION#refs/heads/}" -r 's#/+#-#g')