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