From: Don Zickus <dzickus@xxxxxxxxxx> The dist-release target allows the caller to repeatedly bump the version in Makefile.rhelver, even though no changes was added. Change this behaviour to _only_ bump the version when either a changelog entry was detected or the marker file was updated, otherwise skip the version bump. This becomes necessary for the next patch, when I change the behaviour of the release script. I intend to version bump the os-build branch first, then create ark-latest and version bump again. Later when we consolidate to a single tree workflow, there will be scenarios where os-build and ark-latest are identical and the second version bump will be unnecessary. This change is not expected to change anything, unless blind version bumps are expected in certain scenarios. Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx> --- redhat/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/redhat/Makefile b/redhat/Makefile index aff8120ae0bb..8543e1633c51 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -298,12 +298,15 @@ dist-rpm-baseonly: dist-sources # unless you know what you're doing, you don't want to use the next three ones dist-release-finish: setup-source @cp $(SOURCES)/$(CHANGELOG) $(REDHAT)/$(CHANGELOG) - @git add $(REDHAT)/$(CHANGELOG) @echo $(MARKER) > $(REDHAT)/marker - @git add $(REDHAT)/marker - @git commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(CHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(STAMP_VERSION)-$(PREBUILD)$(BUILD)$(BUILDID)" + @# if neither changelog nor marker was updated, skip bumping a release + git diff-index --quiet HEAD && (echo "Nothing changed, skipping updates"; exit 0) || true + $(REDHAT)/scripts/new_release.sh $(REDHAT) $(__YSTREAM) $(__ZSTREAM); \ + git add $(REDHAT)/$(CHANGELOG); \ + git add $(REDHAT)/marker; \ + git commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(CHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(STAMP_VERSION)-$(PREBUILD)$(BUILD)$(BUILDID)"; \ + dist-release: dist-clean-sources - @$(REDHAT)/scripts/new_release.sh $(REDHAT) $(__YSTREAM) $(__ZSTREAM) @$(MAKE) dist-release-finish dist-release-tag: @git tag -a -m "$(PACKAGE_NAME)-$(STAMP_VERSION)-$(PKGRELEASE)" $(PACKAGE_NAME)-$(STAMP_VERSION)-$(PKGRELEASE) -- GitLab _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx