pkg.sh: Drop the RELEASES file in the release commit
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m20s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m46s
CI / Packaging test (pull_request) Successful in 0s

The release tags replace the RELEASES bookkeeping, but the file is still
tracked in jw-pkg and in every other project repo, and removing it by hand
in each of them does not scale.

Make check_update_version() remove the RELEASES file from the tree in the
release commit itself when it is still there, so the next release of each
project drops it automatically. The removal is git only, as the release
flow is; a repo without a tracked RELEASES file is unaffected.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.0
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-11-10 06:58:48 +01:00
commit a24769a840
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -314,10 +314,17 @@ check_update_version()
if [ "$next" != "$v" ]; then
local h=`calculate_hash`
[ -n "$h" ] || fatal "failed to calculate source hash"
local files="VERSION $TOPDIR/HASH"
# the release tags replace the RELEASES file; the
# release commit drops it from the tree
if [ "$SCM" = git ] && [ -f $TOPDIR/RELEASES ] && \
git rm -qf $TOPDIR/RELEASES 2>/dev/null; then
files="$files $TOPDIR/RELEASES"
fi
echo "$next-dev" > VERSION
write_map $TOPDIR/HASH $h
$SCM add $TOPDIR/HASH || true
scm_commit -m "$comment $next" VERSION $TOPDIR/HASH
scm_commit -m "$comment $next" $files
return 0
fi
return 1