diff options
author | John Rigby <john.rigby@linaro.org> | 2010-09-03 00:03:56 -0600 |
---|---|---|
committer | John Fredriksson <john.xj.fredriksson@stericsson.com> | 2011-10-28 16:19:03 +0200 |
commit | c9509f78bf1644452f9ffd4fb0a7528b56b3e562 (patch) | |
tree | 77151173d941e9f2a410c4a46fdcb6413f63f38a /debian/scripts/misc/retag | |
parent | 9c4cecf7de2bada874943d019010299e2e181ca3 (diff) |
LINARO: Add generic linaro packaging
Signed-off-by: John Rigby <john.rigby@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); |