[Kernel-handbook-general] [PATCH 2/2] Use changelog date as document date

Ben Hutchings ben at decadent.org.uk
Thu Nov 5 22:32:06 UTC 2015


---
I've pushed this to master too.

Ben.

 Makefile         | 6 +++---
 debian/changelog | 1 +
 version.ent      | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index c089076..485116c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 version := $(shell dpkg-parsechangelog -SVersion)
-date    := $(shell date)
+date    := $(shell date -d "$$(dpkg-parsechangelog -SDate)")
 
 LANG_PO := ja
 LANG_EN := en
@@ -23,8 +23,8 @@ clean:
 	rm -rf pub
 
 version.ent: FORCE
-	if [ "$(version)" !=						   \
-	     "$$(sed 's/<!entity version "\(.*\)">/\1/; t; d' $@)" ]; then \
+	if [ "$(date)" !=						   \
+	     "$$(sed 's/<!entity date *"\(.*\)">/\1/; t; d' $@)" ]; then   \
 		rm -f $@ &&						   \
 		echo "<!entity version \"$(version)\">"	>> $@ &&	   \
 		echo "<!entity date    \"$(date)\">"    >> $@;		   \
diff --git a/debian/changelog b/debian/changelog
index 99b77b3..ff8742b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ kernel-handbook (1.0.17) UNRELEASED; urgency=medium
   * debian/copyright: Change URL for GPL text to use HTTP-S
   * Remove 'python' from genorig.py command lines, as this is not needed
     and is incorrect since it now needs Python 3
+  * Use changelog date as document date
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sun, 30 Aug 2015 13:21:25 +0100
 
diff --git a/version.ent b/version.ent
index d3b2ce5..22938ea 100644
--- a/version.ent
+++ b/version.ent
@@ -1,2 +1,2 @@
-<!entity version "1.0.16">
-<!entity date    "Fri 14 Aug 12:53:11 CEST 2015">
+<!entity version "1.0.17">
+<!entity date    "Sun 30 Aug 13:21:25 BST 2015">
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/kernel-handbook-general/attachments/20151105/7d60771b/attachment.sig>


More information about the Kernel-handbook-general mailing list