File: git-tag-debian

package info (click to toggle)
schroot 1.6.10-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,396 kB
  • ctags: 2,584
  • sloc: cpp: 20,961; sh: 12,849; makefile: 858; ansic: 231; sed: 16
file content (17 lines) | stat: -rwxr-xr-x 867 bytes parent folder | download | duplicates (24)
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})"