1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#!/bin/bash
# Copyright 2019-2025, gregor herrmann <gregoa@debian.org>
# Released under the WTFPL
# initialize begin
for f in ~/.dpt.conf ~/.config/dpt.conf; do
if [ -r "$f" ]; then
. "$f"
fi
done
. "${DPT__SCRIPTS:-/usr/share/pkg-perl-tools}/lib/dpt-lib.sh"
# initialize end
[ -n "$PKG" ] && [ -n "$VER" ] && [ -n "$DIST" ] || \
die "Source or Version or Distribution not set."
NEW=
while getopts n opt; do
case $opt in
n) NEW="--new";;
*) ;;
esac
done
shift $((OPTIND -1))
if git commit --dry-run -a > /dev/null ; then
header "Release package"
git add debian/changelog
git commit -S -m "releasing package $PKG version $VER into distribution $DIST" -m 'Gbp-Dch: Ignore'
fi
if git commit --dry-run -a > /dev/null ; then
die "git tree dirty …"
fi
header "dgit push-source"
if promptyesno "dgit --gbp $NEW push-source?"; then
echo
dgit --gbp $NEW push-source
if [ $? -ne 0 ]; then
OPTION=--overwrite
if is_installed dgit 11.7; then
OPTION=--trust-changelog
fi
if promptyesno "dgit --gbp $NEW $OPTION push-source?"; then
echo
dgit --gbp $NEW $OPTION push-source
if [ $? -ne 0 ]; then
echo
die "'dgit --gbp $OPTION push-source' failed"
fi
fi
fi
if [ $? -eq 0 ]; then
header "dpt push"
if promptyesno "dpt push?"; then
echo
dpt push
fi
#EVER=$(echo "$VER" | sed -e 's/^[0-9]\+://')
#BUILDINFO=$(ls -rt1 ../{build-area/,}${PKG}_${EVER}_*.buildinfo 2>/dev/null | tail -n1)
#if [ -f "$BUILDINFO" ]; then
# header ".buildinfo"
# if promptyesno "Upload .buildinfo to buildinfo.debian.net?"; then
# echo
# if ! grep -q "BEGIN PGP SIGNATURE" "$BUILDINFO"; then
# debsign --no-re-sign "$BUILDINFO"
# fi
# curl -X PUT --max-time 30 --data-binary @${BUILDINFO} https://buildinfo.debian.net/api/submit
# fi
#fi
fi
# cf. #1056103; fixed in 11.6
rm -rf .git/dgit/unpack
fi
|