[prepair] 01/06: Add get-orig-source script for git snapshots.

Bas Couwenberg sebastic at debian.org
Sat Jul 1 16:06:08 UTC 2017


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

sebastic pushed a commit to branch master
in repository prepair.

commit 4e4013690b64b725a6f0952a1d76da27aae6eea7
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jul 1 17:42:57 2017 +0200

    Add get-orig-source script for git snapshots.
---
 debian/get-orig-source | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..21341c2
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+REMOTE=upstream
+BRANCH=${REMOTE}/master
+
+if [ $(git remote show ${REMOTE} | wc -l) -eq 0 ]; then
+	git remote add ${REMOTE} https://github.com/tudelft3d/prepair.git
+fi
+
+git fetch ${REMOTE} --no-tags
+
+PACKAGE=$(dpkg-parsechangelog | grep ^Source: | awk '{print $2}')
+
+COMMIT=$(git log -n1 --format=format:%h ${BRANCH})
+DATE=$(date +%Y%m%d --date="@$(git log -n1 --format=format:%ct ${BRANCH})")
+
+VERSION="0.7+${DATE}-${COMMIT}"
+
+git archive --format=tar.gz --prefix=${PACKAGE}-${VERSION}/ -o ../${PACKAGE}_${VERSION}.orig.tar.gz ${BRANCH}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/prepair.git



More information about the Pkg-grass-devel mailing list