[debian-edu-commits] [Git][debian-edu/debian-edu-doc][master] documentation/scripts/get_manual: set DOC_DATE based on current date as...

Holger Levsen gitlab at salsa.debian.org
Wed May 1 12:39:32 BST 2019



Holger Levsen pushed to branch master at Debian Edu / debian-edu-doc


Commits:
75fe6e79 by Holger Levsen at 2019-05-01T11:24:00Z
documentation/scripts/get_manual: set DOC_DATE based on current date as get_manual is only called manually when the document is updated from the wiki.

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- debian/changelog
- documentation/scripts/get_manual


Changes:

=====================================
debian/changelog
=====================================
@@ -1,6 +1,9 @@
 debian-edu-doc (2.10.17) UNRELEASED; urgency=medium
 
-  *
+  [ Holger Levsen ]
+  * documentation/scripts/get_manual: set DOC_DATE based on current date as
+    get_manual is only called manually when the document is updated from the
+    wiki.
 
  -- Holger Levsen <holger at debian.org>  Sat, 01 Jun 2019 02:23:42 +0200
 


=====================================
documentation/scripts/get_manual
=====================================
@@ -166,11 +166,10 @@ echo "calling ../scripts/get_images $xmlfile $path1"
 #  -0\777  read multiple lines
 perl -0\777 -pi -e "s/<ulink url=\"$path2(.*)\/(.*)\">(.*)\n<\/ulink>/<link linkend=\"\2\">\3<\/link>/g" $xmlfile
 
-# set SOURCE_DATE_EPOCH
-SOURCE_DATE_EPOCH="$(dpkg-parsechangelog -STimestamp -l ../../debian/changelog)"
-DATE="$(date -d @$SOURCE_DATE_EPOCH +'%Y-%m-%d')"
+# set DOC_DATE based on current date as get_manual is only called manually when the document is updated from the wiki
+DOC_DATE="$(TZ=UTC date +'%Y-%m-%d')"
 # make it a docbook article again
-sed -i "1,/</ s#<#<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook XML V4.4//EN\" \"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"><article lang=\"en\"><articleinfo><title>$DEBIAN_EDU_DOC_TITLE $DATE</title></articleinfo>\n<#" $xmlfile
+sed -i "1,/</ s#<#<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook XML V4.4//EN\" \"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"><article lang=\"en\"><articleinfo><title>$DEBIAN_EDU_DOC_TITLE $DOC_DATE</title></articleinfo>\n<#" $xmlfile
 sed -i "$ s#>#>\n</article>#" $xmlfile
 # remove the first empty lines
 sed -i "1,2d" $xmlfile



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/commit/75fe6e798fffe329cf433fbf822618cc03669631

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/commit/75fe6e798fffe329cf433fbf822618cc03669631
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20190501/b759219f/attachment-0001.html>


More information about the debian-edu-commits mailing list