From 82a2a9cc13a6b9960fad095110a2bd2dd161035b Mon Sep 17 00:00:00 2001 From: matthewwall Date: Wed, 5 Oct 2016 08:49:51 -0400 Subject: [PATCH 1/2] do changelog tests in target shell, not makefile --- makefile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/makefile b/makefile index 787b6660..71376ded 100644 --- a/makefile +++ b/makefile @@ -154,14 +154,13 @@ done DEBREVISION=1 DEBVER=$(VERSION)-$(DEBREVISION) -DEBCHANGED=$(shell grep "$(DEBVER)" pkg/debian/changelog) # add a skeleton entry to deb changelog deb-changelog: -ifeq ("$(DEBCHANGED)","") - pkg/mkchangelog.pl --action stub --format debian --release-version $(DEBVER) > pkg/debian/changelog.new - cat pkg/debian/changelog >> pkg/debian/changelog.new - mv pkg/debian/changelog.new pkg/debian/changelog -endif + if [ "`grep $(DEBVER) pkg/debian/changelog`" = "" ]; then \ + pkg/mkchangelog.pl --action stub --format debian --release-version $(DEBVER) > pkg/debian/changelog.new; \ + cat pkg/debian/changelog >> pkg/debian/changelog.new; \ + mv pkg/debian/changelog.new pkg/debian/changelog; \ +fi # use dpkg-buildpackage to create the debian package # -us -uc - skip gpg signature on .dsc and .changes @@ -206,14 +205,13 @@ upload-deb: RPMREVISION=1 RPMVER=$(VERSION)-$(RPMREVISION) -RPMCHANGED=$(shell grep "$(RPMVER)" pkg/changelog.rpm) # add a skeleton entry to rpm changelog rpm-changelog: -ifeq ("$(RPMCHANGED)","") - pkg/mkchangelog.pl --action stub --format redhat --release-version $(RPMVER) > pkg/changelog.rpm.new - cat pkg/changelog.rpm >> pkg/changelog.rpm.new - mv pkg/changelog.rpm.new pkg/changelog.rpm -endif + if [ "`grep $(RPMVER)1 pkg/changelog.rpm`" = "" ]; then \ + pkg/mkchangelog.pl --action stub --format redhat --release-version $(RPMVER) > pkg/changelog.rpm.new; \ + cat pkg/changelog.rpm >> pkg/changelog.rpm.new; \ + mv pkg/changelog.rpm.new pkg/changelog.rpm; \ +fi # use rpmbuild to create the rpm package RPMARCH=noarch From 41b19e3098946d955f22be06a7a2359aecc6ac3d Mon Sep 17 00:00:00 2001 From: matthewwall Date: Wed, 5 Oct 2016 08:51:04 -0400 Subject: [PATCH 2/2] do not update changelog with every version tag, since signing is coupled with the username embedded in the changelog entries --- makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/makefile b/makefile index 71376ded..f5973184 100644 --- a/makefile +++ b/makefile @@ -149,8 +149,6 @@ version: mv docs/$$f.tmp docs/$$f; \ done sed -e 's/version =.*/version = $(VERSION)/' weewx.conf > weewx.conf.tmp; mv weewx.conf.tmp weewx.conf - make deb-changelog - make rpm-changelog DEBREVISION=1 DEBVER=$(VERSION)-$(DEBREVISION)