pkg.sh: Don't bump an unreleased version
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m49s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m43s
CI / Packaging test (pull_request) Successful in 0s

Return the current version from check_next_version() when the platform has
no release tag for it.  A missing tag together with an unchanged source
means the release commit allocated the version and this platform only has
to release it. The reinstall check then only runs when the tag exists, i.e.
when a release already happened and its installed package might be broken.

This keeps the version from being bumped twice in the same release run.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-11-11 07:19:13 +01:00
commit 8dee1ed41e
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -197,6 +197,13 @@ check_next_version()
return
fi
echo "+ $PKG_PROJECT has unchanged source" >&2
if ! release_tags | grep -qF "v$v@"; then
# the release commit allocated $v and recorded the source hash; a missing tag means
# this platform has not released it yet, so release $v as is
echo "+ $PKG_PROJECT has no release tag for $v on `platform`, needs release" >&2
echo $v
return
fi
if [ "$reinstall_check_failed" = 1 ]; then
echo "version $v is uninstallable, needs release" >&2
increase_build_no $v