From 1c3dbc95489862892e2ea11b8776afc5253444ae Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 5 Jun 2024 15:08:07 -0700 Subject: [PATCH] Makefile: Add PREV support for clog When making a new release that contains commits that have already been merged onto c10s (but not build) running make release would result in an empty changelog. This adds the PREV environmental variable so that the hash of the previous release can be used as the reference for creating the clog. eg. PREV=ACTUALHASH make release Where ACTUALHASH is the git hash of the commit used to make the previous release. Usually this is one commit before the first commit you want to include in this build. Related: RHEL-40021 --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc24469..9e5497c 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ NAME=lorax-templates-rhel RHELVER=10.0 RHPKG=centpkg --release=c10s +# Previous release, override this when new commits are already on c10s +PREV ?= origin/c10s + # git user.email and user.name must be setup GITEMAIL := $(shell git config user.email) GITNAME := $(shell git config user.name) @@ -34,7 +37,7 @@ update-spec: clog clog: @echo "* $(shell date '+%a %b %d %Y') ${GITNAME} <${GITEMAIL}> - ${RHELVER}-${SERIAL}" > clog-spec - ./tools/git-changelog -t origin/c10s > clog + ./tools/git-changelog -t ${PREV} > clog cat clog >> clog-spec # These need to rerun make to pick up the bumped serial number