aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2022-11-27 14:16:58 +0100
committerGuido Günther <agx@sigxcpu.org>2022-11-27 14:16:58 +0100
commit84678d269a808fdbc833beb0d1d52e6b16d3225d (patch)
tree6f6272fb7ac8daacd1f22220398b6b69c9b0715c
parent8394374f0421e20d5629aaf415d10ad07138fe58 (diff)
upload: Honor export-dir
Not everyone just puts built debs to ../
-rwxr-xr-xexamples/gbp-upload15
1 files 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 <RETURN> to upload, <CTRL>-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}"