From 477140f53cf387f09b1336630ed45bebad2b5ff8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Mar 2011 03:58:43 +0100 Subject: add git script to tag, changelog and tar for release --- git/funcs_git.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 git/funcs_git.sh (limited to 'git/funcs_git.sh') diff --git a/git/funcs_git.sh b/git/funcs_git.sh new file mode 100755 index 0000000..86b8f2c --- /dev/null +++ b/git/funcs_git.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +function git-new-milestone() { + local module="$1" + local last="$2" + local new="$3" + + if [ -z "$module" -o -z "$last" -o -z "$new" ] ; then + echo "Usage: $0 module last-ref new-ref" + exit 1 + fi + + echo "Module $module - Tag $new" + git archive --format=tar --prefix=$module-$new/ $new | xz -z -9 > ../archive/$module-$new.tar.xz + git archive --format=zip --prefix=$module-$new/ $new -o ../archive/$module-$new.zip + git log --no-merges $new ^$last > ../archive/$module-ChangeLog-$new + git shortlog --no-merges $new ^$last > ../archive/$module-ShortLog-$new + git diff --stat --summary -M $last $new > ../archive/$module-diffstat-$new +} -- cgit v1.2.3