Blame SOURCES/0017-maintainer-Add-rules-for-maintainers.patch

e10a2d
From b6161b67b0bd542169e13cdfa0488a0266e3ae7a Mon Sep 17 00:00:00 2001
e10a2d
From: "Richard W.M. Jones" <rjones@redhat.com>
e10a2d
Date: Thu, 3 Oct 2019 10:13:43 +0100
08d0b2
Subject: [PATCH 17/25] maintainer: Add rules for maintainers.
e10a2d
e10a2d
Adds:
e10a2d
make maintainer-check-extra-dist
e10a2d
make maintainer-commit
e10a2d
make maintainer-tag
e10a2d
---
e10a2d
 Makefile.am | 27 +++++++++++++++++++++++++++
e10a2d
 1 file changed, 27 insertions(+)
e10a2d
e10a2d
diff --git a/Makefile.am b/Makefile.am
e10a2d
index 1cb73b7..5435132 100644
e10a2d
--- a/Makefile.am
e10a2d
+++ b/Makefile.am
e10a2d
@@ -41,3 +41,30 @@ virt-what.txt: virt-what.pod
e10a2d
 	pod2text $? > $@
e10a2d
 
e10a2d
 endif
e10a2d
+
e10a2d
+#----------------------------------------------------------------------
e10a2d
+# Maintainers only!
e10a2d
+
e10a2d
+# Check no files are missing from EXTRA_DIST rules, and that all
e10a2d
+# generated files have been included in the tarball.  (Note you must
e10a2d
+# have done 'make dist')
e10a2d
+maintainer-check-extra-dist:
e10a2d
+	@zcat $(PACKAGE_NAME)-$(VERSION).tar.gz | tar tf - | sort | \
e10a2d
+	  sed 's,^$(PACKAGE_NAME)-$(VERSION)/,,' > tarfiles
e10a2d
+	@git ls-files | \
e10a2d
+	  sort > gitfiles
e10a2d
+	@comm -13 tarfiles gitfiles > comm-out
e10a2d
+	@echo Checking for differences between EXTRA_DIST and git ...
e10a2d
+	@cat comm-out
e10a2d
+	@[ ! -s comm-out ]
e10a2d
+	@rm tarfiles gitfiles comm-out
e10a2d
+	@echo PASS: EXTRA_DIST tests
e10a2d
+
e10a2d
+# Commit everything in the current directory and set the commit
e10a2d
+# message to the current version number.
e10a2d
+maintainer-commit:
e10a2d
+	git commit -a -m "Version $(VERSION)."
e10a2d
+
e10a2d
+# Tag HEAD with the current version.
e10a2d
+maintainer-tag:
e10a2d
+	git tag -a v$(VERSION) -m "Version $(VERSION)." -f
e10a2d
-- 
08d0b2
2.18.4
e10a2d