File: git-debian-retag

package info (click to toggle)
git-stuff 11-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 468 kB
  • sloc: sh: 1,072; perl: 152; makefile: 128
file content (23 lines) | stat: -rwxr-xr-x 525 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

## Copyright (C) 2006-2011 Daniel Baumann <daniel.baumann@progress-technologies.net>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.


set -e

Tag ()
{
	_TAG="${1}"
	HASH="$(git log | grep -B4 ${_TAG} | awk '/^commit/ { print $2 }')"

	git-${_MODE}-tag ${_TAG} ${HASH}
}

for TAG in $(git tag | grep ^${_MODE})
do
	Tag $(echo ${TAG} | awk -F/ '{ print $2 }')
done