File: git-tag-release

package info (click to toggle)
sbuild 0.60.0-2squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,136 kB
  • ctags: 640
  • sloc: perl: 14,039; sh: 1,173; sql: 772; makefile: 406
file content (14 lines) | stat: -rwxr-xr-x 641 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

set -e

PACKAGE="$(sed -ne '/^Welcome to /{s/Welcome to[[:space:]][[:space:]]*\([[:alnum:]][[:alnum:]]*\)[[:space:]][[:space:]]*\([[:alnum:]][[:alnum:].-]*\)\..*/\1/p;q}' < NEWS)"
VERSION="$(sed -ne '/^Welcome to /{s/Welcome to[[:space:]][[:space:]]*\([[:alnum:]][[:alnum:]]*\)[[:space:]][[:space:]]*\([[:alnum:]][[:alnum:].-]*\)\..*/\2/p;q}' < NEWS)"

if [ -z "$PACKAGE" ] || [ -z "$VERSION" ]; then
  echo "Error parsing package name and version from NEWS"
  exit 1
fi

echo "Tagging ${PACKAGE} version ${VERSION} as 'release/${PACKAGE}-${VERSION}'"
git tag -s "release/${PACKAGE}-${VERSION}" -m "${PACKAGE} version ${VERSION}"