File: git-tag-debian

package info (click to toggle)
sbuild 0.65.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,748 kB
  • ctags: 624
  • sloc: perl: 12,433; sh: 4,867; sql: 797; makefile: 450; lisp: 304
file content (17 lines) | stat: -rwxr-xr-x 867 bytes parent folder | download | duplicates (31)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

DEBSOURCE="$(dpkg-parsechangelog | sed -ne '/^Source:/{s/Source:[[:space:]][[:space:]]*//p;q}')"
DEBVERSION="$(dpkg-parsechangelog | sed -ne '/^Version:/{s/Version:[[:space:]][[:space:]]*//p;q}')"
DEBDIST="$(dpkg-parsechangelog | sed -ne '/^Distribution:/{s/Distribution:[[:space:]][[:space:]]*//p;q}')"
DEBURGENCY="$(dpkg-parsechangelog | sed -ne '/^Urgency:/{s/Urgency:[[:space:]][[:space:]]*//p;q}')"

if [ -z "$DEBSOURCE" ] || [ -z "$DEBVERSION" ] || \
   [ -z "$DEBDIST" ] || [ -z "$DEBURGENCY" ]; then
    echo "Error parsing source, version, distribution and urgency from debian/changelog"
    exit 1
fi

echo "Tagging ${DEBSOURCE}-${DEBVERSION} (dist=${DEBDIST}, urgency=${DEBURGENCY}) as 'debian/${DEBSOURCE}-${DEBVERSION}'"

git tag -s "debian/${DEBSOURCE}-${DEBVERSION}" -m "${DEBSOURCE}-${DEBVERSION} (dist=${DEBDIST}, urgency=${DEBURGENCY})"