From 84678d269a808fdbc833beb0d1d52e6b16d3225d Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sun, 27 Nov 2022 14:16:58 +0100 Subject: upload: Honor export-dir Not everyone just puts built debs to ../ --- examples/gbp-upload | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/gbp-upload b/examples/gbp-upload index 7f4db5d7..0a086e56 100755 --- a/examples/gbp-upload +++ b/examples/gbp-upload @@ -3,23 +3,32 @@ # 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 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="../${SOURCE}_${VERSION}_source.changes" +CHANGES="${DEBS_DIR}/${SOURCE}_${VERSION}_source.changes" less --quit-at-eof "${CHANGES}" echo "Hit to upload, -C to quit" read -r VAL +echo "Signing tag and built artifacts" gbp tag -debsign -S +debsign --debs-dir ${DEBS_DIR} -S -dput "${CHANGES}" +echo "Uploading ${CHANGES}" +dput $@ "${CHANGES}" +echo "Pushing to ${REMOTE}" gbp push "${REMOTE}" -- cgit v1.2.3