diff options
author | Eric Miao <eric.miao@linaro.org> | 2011-10-10 17:04:10 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2011-10-24 21:17:08 +0800 |
commit | 65e7f1216c6d7f4e6d0114600d979539ad6cecae (patch) | |
tree | 95c7472636d65d8c1071fd9a9ab28e8afd7e80a8 /debian/scripts/misc/retag | |
parent | 07556b5d903f9efce7030b148e30a782038ebb31 (diff) |
LINARO: import debian packaging from linux-linaro-oneiric
Ignore: yes
Signed-off-by: Eric Miao <eric.miao@linaro.org>
Diffstat (limited to 'debian/scripts/misc/retag')
-rwxr-xr-x | debian/scripts/misc/retag | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/scripts/misc/retag b/debian/scripts/misc/retag new file mode 100755 index 00000000000..94cf169a076 --- /dev/null +++ b/debian/scripts/misc/retag @@ -0,0 +1,34 @@ +#!/usr/bin/perl -w + +open(TAGS, "git tag -l |") or die "Could not get list of tags"; +@tags = <TAGS>; +close(TAGS); + +open(LOGS, "git log --pretty=short |") or die "ERROR: Calling git log"; +my $commit = ""; + +while (<LOGS>) { + my $origtag; + + if (m|^commit (.*)$|) { + $commit = $1; + next; + } + + m|\s*UBUNTU: (Ubuntu-2\.6\..*)| or next; + + $tag = $1; + + ($origtag) = grep(/^$tag.orig$/, @tags); + + if (!defined($origtag)) { + print "I: Adding original tag for $tag\n"; + system("git tag -m $tag $tag.orig $tag"); + } + + print "I: Tagging $tag => $commit\n"; + + system("git tag -f -m $tag $tag $commit"); +} + +close(LOGS); |