From a24769a8405c8fa4939ee672c24fa08103b95eb2 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 10 Nov 2026 06:58:48 +0100 Subject: [PATCH] pkg.sh: Drop the RELEASES file in the release commit 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 --- scripts/pkg.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/pkg.sh b/scripts/pkg.sh index dda435eb..f9064243 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -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