release.sh: stop doing "-dev" releases on stable branches

Note: here I refer to the numbers in a version as MAJOR.MINOR.MICRO.

Having stable and development releases do make sense for the MINOR
version, because we maintain separate branches for them and they
evolve separately. We have 1.47.z where we put all the changes so
anyone can pick the latest development release and test it. At the
same time, we have 1.46.z with the latest stable released version.

However, it does not make sense to have 1.46.2 and 1.46.3-dev because
the latter is not a development version. It is identical to 1.46.2,
only the version number has been bumped, there are no changes to test.
When we add commits, we will be actually testing 1.46.3-dev + some
commits, which is exactly the same as testing 1.46.2 + some commits.

So, basically, someone can use the releases of a development BRANCH,
like 1.47.4, to test the development version of NM. But using a
development MICRO version is exactly the same as using a
non-development one.

From now on, we will just increment the MICRO version each time we do a
release on a stable branch and won't create the '-dev' tag. Update
release.sh to do it this way.

(cherry picked from commit 8eb00c0991)
This commit is contained in:
Íñigo Huguet 2024-05-06 14:09:50 +02:00 committed by Lubomir Rintel
parent 017ae2b58a
commit de5cce5972
2 changed files with 11 additions and 22 deletions

5
NEWS
View file

@ -22,6 +22,11 @@ Overview of changes since NetworkManager-1.46
when IPv6 device address was not explicitly passed on by ModemManager
* Fix a performance issue that was leading to 100% CPU usage by NetworkManager
if external programs were doing a big amount of routes updates.
* Patch-level development releases (i.e. 1.48.1-dev) won't be used anymore.
From now on, all the patch releases whithin a stable branch will be normal
releases, like 1.48.0, 1.48.1, 1.48.2, 1.48.3 and so on.
Odd numbers in the minor version number still indicates if it's a development
branch like 1.49 or a stable one like 1.48.
=============================================
NetworkManager-1.46

View file

@ -14,12 +14,11 @@
# - "rc" : further release candidates on RC branch (e.g. from "nm-1-26" branch
# tag "1.26-rc2" with version number 1.25.91).
# - "major" : on stable branch do a major release (e.g. on "nm-1-26" branch
# release "1.26.0", followed by "1.26.1-dev").
# release "1.26.0").
# You should do a "major-post" release right a "major" release.
# - "major-post": after a "major" release, merge the release branch with main and
# do another devel snapshot on main (e.g. do "1.27.1-dev" release).
# - "minor" : on a stable branch do a minor release (e.g. "1.26.4" on "nm-1-26"
# branch and bump to "1.26.5-dev").
# - "minor" : on a stable branch do a minor release (e.g. "1.26.4" on "nm-1-26").
#
# Requisites:
#
@ -296,8 +295,7 @@ RC_VERSION=
RELEASE_BRANCH=
case "$RELEASE_MODE" in
minor)
number_is_even "${VERSION_ARR[1]}" &&
number_is_odd "${VERSION_ARR[2]}" || die "cannot do minor release on top of version $VERSION_STR"
number_is_even "${VERSION_ARR[1]}" || die "cannot do minor release on top of version $VERSION_STR"
[ "$CUR_BRANCH" != main ] || die "cannot do a minor release on main"
;;
devel)
@ -431,19 +429,13 @@ case "$RELEASE_MODE" in
minor)
set_version_number "${VERSION_ARR[0]}" "${VERSION_ARR[1]}" $(("${VERSION_ARR[2]}" + 1))
git commit -m "release: bump version to ${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 1))" -a || die "failed to commit release"
set_version_number "${VERSION_ARR[0]}" "${VERSION_ARR[1]}" $(("${VERSION_ARR[2]}" + 2))
git commit -m "release: bump version to ${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 2)) (development)" -a || die "failed to commit devel version bump"
b="${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 1))"
git tag -s -a -m "Tag $b" "$b" HEAD~ || die "failed to tag release"
git tag -s -a -m "Tag $b" "$b" HEAD || die "failed to tag release"
BRANCHES+=("$b")
CLEANUP_REFS+=("refs/tags/$b")
BUILD_TAG="$b"
b="${VERSION_ARR[0]}.${VERSION_ARR[1]}.$(("${VERSION_ARR[2]}" + 2))"
git tag -s -a -m "Tag $b (development)" "$b-dev" HEAD || die "failed to tag devel version"
BRANCHES+=("$b-dev")
CLEANUP_REFS+=("refs/tags/$b-dev")
TAR_VERSION="$BUILD_TAG"
TAR_VERSION="$b"
;;
devel)
set_version_number "${VERSION_ARR[0]}" "${VERSION_ARR[1]}" $(("${VERSION_ARR[2]}" + 1))
@ -482,20 +474,12 @@ case "$RELEASE_MODE" in
;;
major)
b="${VERSION_ARR[0]}.$((${VERSION_ARR[1]} + 1)).0"
b2="${VERSION_ARR[0]}.$((${VERSION_ARR[1]} + 1)).1"
set_version_number "${VERSION_ARR[0]}" "$((${VERSION_ARR[1]} + 1))" 0
git commit -m "release: bump version to $b" -a || die "failed to commit major version bump"
git tag -s -a -m "Tag $b" "$b" HEAD || die "failed to tag release"
BRANCHES+=("$b")
CLEANUP_REFS+=("refs/tags/$b")
set_version_number "${VERSION_ARR[0]}" "$((${VERSION_ARR[1]} + 1))" 1
git commit -m "release: bump version to $b2 (development)" -a || die "failed to commit another bump after major version bump"
git tag -s -a -m "Tag $b (development)" "$b2-dev" HEAD || die "failed to tag release"
BRANCHES+=("$b2-dev")
CLEANUP_REFS+=("refs/tags/$b2-dev")
BUILD_TAG="$b"
TAR_VERSION="$b"
;;