notcurses/tools/debrelease.sh

44 lines
1.0 KiB
Bash
Raw Normal View History

2020-07-26 21:39:46 -04:00
#!/bin/sh
set -e
# export DISTRIBUTION to use something other than unstable (or whatever was
2021-05-19 20:34:51 -04:00
# last used in debian/changelog). see dch(1). can use a DEBVERSION exported
# in the process's environment.
usage() { echo "usage: `basename $0` version notcursessrcdir" ; }
2020-07-26 21:39:46 -04:00
[ $# -eq 2 ] || { usage >&2 ; exit 1 ; }
2020-07-26 21:39:46 -04:00
VERSION="$1"
SRCDIR="$2"
2020-07-26 21:39:46 -04:00
2021-05-19 20:34:51 -04:00
if [ -z "$DEBVERSION" ] ; then
DEBVERSION=1
fi
2020-12-06 13:45:35 -05:00
rm -fv debian/files
dch -v $VERSION+dfsg-$DEBVERSION
if [ -n "$DISTRIBUTION" ] ; then
dch -r --distribution "$DISTRIBUTION"
else
dch -r
fi
2020-07-26 21:39:46 -04:00
uscan --repack --compression xz --force
XBALL=../notcurses_$VERSION+dfsg.orig.tar.xz
gpg --sign --armor --detach-sign $XBALL
ASC=$(readlink -f $XBALL.asc)
XBALL=$(readlink -f $XBALL) # eliminates ../
cd "$SRCDIR"
2025-01-09 03:53:51 -05:00
gh release upload v$VERSION $ASC $XBALL
cd -
git commit -m "v$VERSION" -a
gbp import-orig --upstream-version=$VERSION ../notcurses_$VERSION+dfsg.orig.tar.xz
2020-07-26 21:39:46 -04:00
git push --tags
dpkg-buildpackage --build=source
2020-08-27 15:45:31 -04:00
cd ..
2025-01-11 20:06:56 -05:00
xterm -e sudo pbuilder build notcurses*dsc
2020-08-27 15:45:31 -04:00
cd -
git push
2020-08-31 22:28:58 -04:00
rm debian/files