[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gbp vs. vcswatch - how to create automatic debian tags?



On Oct 05, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:

> Could anyone tell me what the proper gbp command is for creating the changelog
This works for me.

md:~ $ cat ~/bin/git-debtag
#!/bin/sh -e

VER="$(dpkg-parsechangelog --show-field Version)"

if [ -z "$VER" ]; then
  echo "Could not parse the changelog!" >&2
  exit 1
fi

# mangle the Debian version number as required by git conventions
VER="$(echo "$VER" | sed -e 's/~/_/g' -e 's/:/%/g')"

if dpkg-parsechangelog --show-field Version | egrep -q -- '-[0-9]+$'; then
  TAG="debian/$VER"
else
  TAG="v$VER"
fi

export GIT_COMMITTER_DATE="$(dpkg-parsechangelog --show-field Date)"

exec git tag -s -m "version $VER" $TAG $1

-- 
ciao,
Marco

Attachment: signature.asc
Description: PGP signature


Reply to: