2020-07-26 21:39:46 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-03-28 18:21:24 -04:00
|
|
|
# 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.
|
2020-07-26 21:39:46 -04:00
|
|
|
usage() { echo "usage: `basename $0` version" ; }
|
|
|
|
|
|
|
|
[ $# -eq 1 ] || { usage >&2 ; exit 1 ; }
|
|
|
|
|
|
|
|
VERSION="$1"
|
|
|
|
|
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
|
2021-05-19 20:34:51 -04:00
|
|
|
dch -v $VERSION+dfsg.1-$DEBVERSION
|
2021-03-28 18:21:24 -04:00
|
|
|
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
|
|
|
|
gpg --sign --armor --detach-sign ../notcurses_$VERSION+dfsg.1.orig.tar.xz
|
2020-07-26 23:50:28 -04:00
|
|
|
# FIXME this seems to upload to $VERSION.dfsg as opposed to $VERSION+dfsg?
|
2020-07-26 21:39:46 -04:00
|
|
|
github-asset dankamongmen/notcurses upload v$VERSION ../notcurses_$VERSION+dfsg.1.orig.tar.xz ../notcurses_$VERSION+dfsg.1.orig.tar.xz.asc
|
2020-07-26 22:07:15 -04:00
|
|
|
git commit -m "v$VERSION" -a
|
2020-11-22 00:24:48 -05:00
|
|
|
|
|
|
|
echo
|
2021-06-03 03:04:29 -04:00
|
|
|
echo "Go change the $VERSION.dfsg to $VERSION+dfsg before proceeding, bro"
|
2020-11-22 00:24:48 -05:00
|
|
|
echo
|
|
|
|
|
2020-07-26 21:39:46 -04:00
|
|
|
gbp import-orig ../notcurses_$VERSION+dfsg.1.orig.tar.xz
|
|
|
|
git push --tags
|
|
|
|
dpkg-buildpackage --build=source
|
2020-08-27 15:45:31 -04:00
|
|
|
cd ..
|
|
|
|
export TERM=xterm-256color && sudo pbuilder build *dsc
|
|
|
|
cd -
|
|
|
|
git push
|
2020-08-31 22:28:58 -04:00
|
|
|
rm debian/files
|