From fa728cf152ec7532e9bfac9664f0f655bee6915e Mon Sep 17 00:00:00 2001 From: Yurii Vlasenko Date: Sat, 14 Mar 2015 02:34:19 +0200 Subject: [PATCH] added support for uploading using dput --- scripts/build-and-provide-package | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/build-and-provide-package b/scripts/build-and-provide-package index e7b5c3ad..8feff0d3 100755 --- a/scripts/build-and-provide-package +++ b/scripts/build-and-provide-package @@ -575,6 +575,24 @@ reprepro_wrapper() { [ $? -eq 0 ] || bailout 1 "Error: Failed to include binary package in $REPOS repository." } +dput_wrapper() { + command -v dput || bailout 1 "Error: dput not found." + + remove_packages + remove_missing_binary_packages + + archall=false + case $architecture in + all) archall=true + architecture='*' # support as file expansion in cmdline + ;; + esac + + echo "*** Including packages in repository $REPOS ***" + ${SUDO_CMD:-} dput -U -u "${DPUT_HOST:-}" "${WORKSPACE}/binaries/"*"${newest_version}"_${architecture}.changes + [ $? -eq 0 ] || bailout 1 "Error: Failed to upload binary package to $DPUT_HOST dput host." +} + freight_ensure_repo() { echo "*** Creating freight directory structure ***" ${SUDO_CMD:-} mkdir -p "${FREIGHT_VARCACHE}" "${FREIGHT_VARLIB}" @@ -700,6 +718,10 @@ deploy_to_releases() { # so this is the stage where we exit in that case. return 0 fi + if [ -n "${USE_DPUT:-}" ] ; then + dput_wrapper + return 0 + fi if [ -n "${release:-}" ] && [ "$release" != "none" ] && [ "$release" != "trunk" ] && \ # '${release}' is a hidden bomb: when provided through predefined parameters