Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions hack/scripts/gen-ver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ version=$(git -C "${srcdir}" describe --match 'v[0-9]*' --always --tags)
commit="$(git --git-dir "${srcdir}/.git" rev-parse HEAD)"
commitShort=${commit:0:7}

# Handle prefixed version formats
# cmd/cli/v0.1.44 -> v0.1.44
if [[ "$version" =~ .*/v[0-9] ]]; then
version="${version##*/}"
fi
# docker-v29.0.0 -> v29.0.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, this is the future tagging strategy starting moby 29?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's supposed to be a tag that's not going to be picked up by Go as a valid go module (because github.com/moby/moby module has different versioning than Docker Engine)

if [[ "$version" =~ ^docker-v[0-9] ]]; then
version="${version#docker-}"
fi

# rpm "Release:" field ($rpmRelease) is used to set the "_release" macro, which
# is an incremental number for builds of the same release (Version: / #rpmVersion).
#
Expand Down