[vdr-plugin-femon] 01/07: Added debian/rule get-vcs-snapshot

Tobias Grimm tiber-guest at moszumanska.debian.org
Wed Dec 27 17:38:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-femon.

commit 5392a56757b6d24cd1c4d8b765405bdcb15828f3
Author: Tobias Grimm <etobi at debian.org>
Date:   Sun Jan 8 10:51:12 2017 +0100

    Added debian/rule get-vcs-snapshot
---
 debian/get-vcs-snapshot.sh | 19 +++++++++++++++++++
 debian/rules               |  3 +++
 2 files changed, 22 insertions(+)

diff --git a/debian/get-vcs-snapshot.sh b/debian/get-vcs-snapshot.sh
new file mode 100644
index 0000000..153b405
--- /dev/null
+++ b/debian/get-vcs-snapshot.sh
@@ -0,0 +1,19 @@
+echo Downloading latest from git repository...
+set -e
+
+DEB_SOURCE_PACKAGE=`egrep '^Source: ' debian/control | cut -f 2 -d ' '`
+VERSION_UPSTREAM=`dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | cut -d- -f1 | sed -r 's/(.*)\+git.*/\1/'`
+VERSION_DATE=`/bin/date --utc +%0Y%0m%0d`
+VERSION_FULL="${VERSION_UPSTREAM}+git${VERSION_DATE}"
+
+git clone --depth 1 https://github.com/rofafor/vdr-plugin-femon.git
+
+cd ${DEB_SOURCE_PACKAGE}
+GIT_SHA=`git show --pretty=format:"%h" --quiet | head -1 || true`
+cd ..
+
+tar --exclude=.git -czf "../${DEB_SOURCE_PACKAGE}_${VERSION_FULL}.orig.tar.gz" ${DEB_SOURCE_PACKAGE}
+
+dch -v "$VERSION_FULL-1" "New Upstream Snapshot (commit $GIT_SHA)"
+
+rm -rf ${DEB_SOURCE_PACKAGE}
diff --git a/debian/rules b/debian/rules
index 5b5f32f..df77587 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,3 +5,6 @@
 
 %:
 	dh $@ --with vdrplugin
+
+get-vcs-snapshot:
+	sh debian/get-vcs-snapshot.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-femon.git



More information about the pkg-vdr-dvb-changes mailing list