tiny shell script to automate debian release

This commit is contained in:
Martin A. Brown 2016-04-27 10:23:30 -07:00
parent 1264a20f97
commit 552f2e46f6
1 changed files with 26 additions and 0 deletions

26
contrib/debian-release.sh Normal file
View File

@ -0,0 +1,26 @@
#! /bin/bash
#
#
set -e
set -x
set -o pipefail
PACKAGE=$(dpkg-parsechangelog | awk '/Source:/{print $2}')
VERSION=$(dpkg-parsechangelog | awk -F'[- ]' '/Version:/{print $2}')
PREFIX="${PACKAGE}-${VERSION}"
TARBALL="../${PACKAGE}_${VERSION}.orig.tar.xz"
git archive \
--format tar \
--prefix "${PREFIX}/" \
"${PREFIX}" \
| xz \
--compress \
--to-stdout \
> "${TARBALL}"
exec debuild
# -- end of file