]> granicus.if.org Git - pdns/commitdiff
Alter the git-to-changelog script
authorPieter Lexis <pieter@plexis.eu>
Tue, 19 Aug 2014 13:16:54 +0000 (15:16 +0200)
committerPieter Lexis <pieter@plexis.eu>
Tue, 25 Nov 2014 19:11:11 +0000 (20:11 +0100)
 It now converts to markdown

build-scripts/git-to-changelog

index 53fd6056acf9d5bf4215eab8b1d275474d6175a2..a474dbb87d77b5557a18a1db4a5e59bdd559f278 100755 (executable)
@@ -1,13 +1,8 @@
 #!/bin/sh
-# 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>
-    $1
-  <\/para>
-<\/listitem>/;'
+if [ "$1" = "-" ]; then
+  cat
+else
+  git log --pretty=format:'- [commit %h](https://github.com/PowerDNS/pdns/commit/%h): %s' "$@" |\
+    sed -r 's!#([[:digit:]]+)![ticket #\1](https://github.com/PowerDNS/pdns/issues/\1)!g;'
+fi