config/scripts/sit-dch

32 lines
514 B
Plaintext
Raw Permalink Normal View History

2010-11-10 15:31:11 +01:00
#!/bin/sh
die () {
echo $*
echo "exiting..."
exit 1
}
status=$(git status --short --untracked-files=no)
if [ "$status" != "" ]; then
die "git working dir is not clean"
fi
if [ ! -e debian/changelog ]; then
die "could not find debian/changelog"
fi
if [ "$1" = "" ]; then
echo "usage: $0 <version>"
exit 0
fi
version=$1
shift
set -e
EDITOR=/bin/true git dch --release --new-version $version
git add debian/changelog
git commit -m "debian package v$version"
git tag debian/$version