[SCM] snd/master: Added postimport-hook that updates the upstream-changelog

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Mon Aug 8 12:42:56 UTC 2016


The following commit has been merged in the master branch:
commit 5d6f2640fb1a606f3b23b6abdf1c643b53ed900f
Author: IOhannes m zmölnig <zmoelnig at iem.at>
Date:   Thu Aug 4 10:15:24 2016 +0200

    Added postimport-hook that updates the upstream-changelog

diff --git a/debian/gbp.conf b/debian/gbp.conf
index 018c2fd..4ddf162 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -2,3 +2,6 @@
 pristine-tar = True
 #upstream-branch = upstream
 #debian-branch = master
+
+[import-orig]
+postimport=debian/upstream-changelog.sh
diff --git a/debian/upstream-changelog.sh b/debian/upstream-changelog.sh
new file mode 100755
index 0000000..b23988c
--- /dev/null
+++ b/debian/upstream-changelog.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+NEWS=NEWS
+CHANGELOG=debian/upstream-changelog
+
+if [ ! -e "${NEWS}" ]; then
+  echo "unable to find (input) ${NEWS}." 1>&2
+  exit 1
+fi
+if [ ! -e "${CHANGELOG}" ]; then
+  echo "unable to find (output) ${CHANGELOG}." 1>&2
+  exit 1
+fi
+
+make_news() {
+  # new changelog entry, without trailing-newlines and with missing LF at EOL
+  sed -e 's| *$||' -e '$a\' "${NEWS}"
+  # separator
+  echo
+  echo "==============================================================================="
+  echo
+  # old changelog
+  cat "${CHANGELOG}"
+}
+
+TMPFILE=$(mktemp)
+make_news > "${TMPFILE}"
+cat "${TMPFILE}" > "${CHANGELOG}"
+rm -f "${TMPFILE}"
+
+
+echo "updated ${CHANGELOG} from ${NEWS}!" 1>&2

-- 
snd packaging



More information about the pkg-multimedia-commits mailing list