diff --git a/maint/Makefile.am b/maint/Makefile.am index be9bd86298..4d3174409e 100644 --- a/maint/Makefile.am +++ b/maint/Makefile.am @@ -1,80 +1,82 @@ # # Copyright 2019-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # # Define release-related variables -include $(abs_srcdir)/../mk/release.mk +include $(top_srcdir)/mk/release.mk include $(top_srcdir)/mk/common.mk noinst_SCRIPTS = bumplibs EXTRA_DIST = README # # Change log generation # # Count changes in these directories CHANGELOG_DIRS = ../include \ ../lib \ ../daemons \ ../tools \ ../xml .PHONY: require_last_release require_last_release: @if [ -z "$(CHECKOUT)" ]; then \ echo "This target must be run from a git checkout"; \ exit 1; \ elif ! "$(GIT)" rev-parse $(LAST_RELEASE) >/dev/null 2>&1; then \ echo "LAST_RELEASE must be set to a valid git tag"; \ exit 1; \ fi .PHONY: summary summary: require_last_release - @printf "* %s %s <%s> %s\n" "$$(date +'%a %b %d %Y')" \ - "$$("$(GIT)" config user.name)" \ - "$$("$(GIT)" config user.email)" \ - "$(NEXT_RELEASE)" - @printf "\055 %d commits with%s\n" \ + @printf "# Pacemaker-%s (%s)\n* %d commits with%s\n" \ + "$(NEXT_RELEASE)" "$$(date +'%d %b %Y')" \ "$$("$(GIT)" log --pretty=oneline --no-merges \ $(LAST_RELEASE)..HEAD | wc -l)" \ "$$("$(GIT)" diff $(LAST_RELEASE)..HEAD --shortstat \ $(CHANGELOG_DIRS))" .PHONY: changes changes: summary - @printf "\n- Features added since $(LAST_RELEASE)\n" + @printf "\n## Features added since $(LAST_RELEASE)\n\n" @"$(GIT)" log --pretty=format:'%s' --no-merges \ --abbrev-commit $(LAST_RELEASE)..HEAD \ - | sed -n -e 's/^ *Feature: */ + /p' | sort -uf - @printf "\n- Fixes since $(LAST_RELEASE)\n" + | sed -n -e 's/^ *Feature: */* /p' | sort -uf \ + | sed -e 's/^\( *[-+*] \)\([^:]*:\)\(.*\)$$/\1**\2**\3/' \ + -e 's/\([ (]\)\([A-Za-z0-9]*_[^ ,]*\)/\1`\2`/g' + @printf "\n## Fixes since $(LAST_RELEASE)\n\n" @"$(GIT)" log --pretty=format:'%s' --no-merges \ --abbrev-commit $(LAST_RELEASE)..HEAD \ - | sed -n -e 's/^ *\(Fix\|High\|Bug\): */ + /p' | sed \ - -e 's/\(cib\|pacemaker-based\|based\):/CIB:/' \ - -e 's/\(lrmd\|pacemaker-execd\|execd\):/executor:/' \ - -e 's/\(crmd\|pacemaker-controld\|controld\):/controller:/' \ - -e 's/\(Fencing\|stonithd?\|pacemaker-fenced\|fenced\):/fencing:/' \ - -e 's/\(PE\|pengine\|pacemaker-schedulerd\|schedulerd\):/scheduler:/' \ - | sort -uf - @printf "\n- Public API changes since $(LAST_RELEASE)\n" + | sed -n -e 's/^ *\(Fix\|High\|Bug\): */* /p' \ + | sed -e 's/\(\(pacemaker-\)?based\):/CIB:/' \ + -e 's/\(\(pacemaker-\)?execd\):/executor:/' \ + -e 's/\(\(pacemaker-\)?controld\):/controller:/' \ + -e 's/\(\(pacemaker-\)?fenced\):/fencing:/' \ + | sort -uf \ + | sed -e 's/^\( *[-+*] \)\([^:]*:\)\(.*\)$$/\1**\2**\3/' \ + -e 's/\([ (]\)\([A-Za-z0-9]*_[^ ,]*\)/\1`\2`/g' + @printf "\n## Public API changes since $(LAST_RELEASE)\n\n" @"$(GIT)" log --pretty=format:'%s' --no-merges \ --abbrev-commit $(LAST_RELEASE)..HEAD \ - | sed -n -e 's/^ *API: */ + /p' | sort -uf + | sed -n -e 's/^ *API: */* /p' | sort -uf \ + | sed -e 's/^\( *[-+*] \)\([^:]*:\)\(.*\)$$/\1**\2**\3/' \ + -e 's/\([ (]\)\([A-Za-z0-9]*_[^ ,]*\)/\1`\2`/g' .PHONY: changelog changelog: require_last_release @printf "%s\n\n%s\n" \ "$$($(MAKE) $(AM_MAKEFLAGS) changes \ | grep -v 'make\(\[[0-9]*\]\)\?:')" \ "$$(cat ../ChangeLog.md)" > ../ChangeLog.md .PHONY: authors authors: require_last_release "$(GIT)" log $(LAST_RELEASE)..$(COMMIT) --format='%an' | sort -u