]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
allow two-step changelog generation, for easier editing
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Wed, 30 Jul 2014 17:06:37 +0000 (19:06 +0200)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Wed, 30 Jul 2014 17:07:18 +0000 (19:07 +0200)
build-scripts/git-to-changelog

index 8100a7ded9b907b750d8371ce98ae66fc7ee2de9..53fd6056acf9d5bf4215eab8b1d275474d6175a2 100755 (executable)
@@ -1,6 +1,13 @@
 #!/bin/sh
-git log --pretty=format:'<listitem>
+# two modes of operation:
+# 1) git-to-changelog auth-3.3.1.. > log.xml
+#    then edit XML and insert into pdns.xml
+# 2) git log --pretty=format:'g%h: %s' auth-3.3.1.. > log.txt
+#    then edit changelog as plain text
+#    then run git-to-changelog - < log.txt > log.xml
+
+if [ "$1" = "-" ] ; then cat ; else git log --pretty=format:'g%h: %s' "$@" ; fi | perl -pe 's/\#(\d+)/t$1/g; s/(.*)/<listitem>
   <para>
-    g%h: %s
-  </para>
-</listitem>' "$@" | perl -pe 's/\#(\d+)/t$1/g'
+    $1
+  <\/para>
+<\/listitem>/;'