Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20.10 backport] [deb] fixes for version generating #831

Merged
merged 5 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion deb/build-deb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ debSource="$(awk -F ': ' '$1 == "Source" { print $2; exit }' debian/control)"
debMaintainer="$(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control)"
debDate="$(date --rfc-2822)"

# Note: on the 20.10 branch, we preserve the "~3" suffix that was removed in
# commit 8a720b28a5d0db8fc93423cca79ca21b9b69f1f1, and continue using the
# old version scheme for docker-ce, docker-ce-cli, and docker-rootless-extras.
cat > "debian/changelog" <<-EOF
$debSource (${EPOCH}${EPOCH_SEP}${DEB_VERSION}-0~${DISTRO}-${SUITE}) $SUITE; urgency=low
$debSource (${EPOCH}${EPOCH_SEP}${DEB_VERSION}~3-0~${DISTRO}-${SUITE}) $SUITE; urgency=low
Comment on lines +43 to +47
Copy link
Member Author

Choose a reason for hiding this comment

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

Revert the changes from 8a720b2 for the docker-ce packages (but continue using the new format for the plugins, so that we don't push the same version of a plugin twice (once through the 23.0 release, once through the 20.10 release).

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, what's the ~3 here for? (Sorry, I'm missing some context 🙈)

Copy link
Member Author

Choose a reason for hiding this comment

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

This was used in 20.10 (and before) to.. make sure "stable" releases ranked higher than "pre-releases" (:lolsob:). I removed that code from master, but the same generation code is used for all deb versions, so I backported removing that ugly hack in this PR (see 8a720b2). However, as 20.10 is reaching its end, I didn't want to introduce changing the versioning scheme for it, so I added it back here. As we're not planning to do -beta releases for 20.10 patch releases, I hardcoded it to ~3 (which was used to designate "stable releases').

* Version: $VERSION
-- $debMaintainer $debDate
EOF
Expand Down
7 changes: 6 additions & 1 deletion rpm/gen-rpm-ver
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ rpmVersion="${VERSION#v}"
# Docker 22.06.0-beta.1: version=22.06.0, release=1
# Docker 22.06.0-rc.1: version=22.06.0, release=1
# Docker 22.06.0-dev: version=0.0.0~YYYYMMDDHHMMSS.gitHASH, release=0
rpmRelease=1
# rpmRelease=1

# Note: on the 20.10 branch, continue using "3" as default, which was removed in
# commit 8a720b28a5d0db8fc93423cca79ca21b9b69f1f1. 23.0.0 and up use "1"
# as default.
rpmRelease=3
Copy link
Member Author

Choose a reason for hiding this comment

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

Same here, for RPMs


# rpm packages require a tilde (~) instead of a hyphen (-) as separator between
# the version # and pre-release suffixes, otherwise pre-releases are sorted AFTER
Expand Down