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
|
#!/bin/sh
#
# Tag, upload to the Debian archive and push to the remote
set -e
set -u
REMOTE=salsa+rw
DEBS_DIR=..
if gbp config upload.remote; then
REMOTE="$(gbp config upload.remote)"
fi
if [ -n "$(gbp config buildpackage.export-dir)" ] ; then
DEBS_DIR="$(gbp config buildpackage.export-dir)"
fi
VERSION="$(dpkg-parsechangelog -S Version)"
SOURCE="$(dpkg-parsechangelog -S Source)"
CHANGES="${DEBS_DIR}/${SOURCE}_${VERSION}_source.changes"
if ! git remote show "${REMOTE}" >/dev/null 2>&1; then
echo "Failed to access ${REMOTE}."
exit 1
fi
less --quit-at-eof "${CHANGES}"
echo "Hit <RETURN> to upload, <CTRL>-C to quit"
read -r VAL
echo "Signing tag and built artifacts"
gbp tag
debsign --debs-dir "${DEBS_DIR}" -S
echo "Uploading ${CHANGES}"
dput $@ "${CHANGES}"
echo "Pushing to ${REMOTE}"
gbp push "${REMOTE}"
|