X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=vars.sh.frag;h=38be71c8079effe158a8a949c2e324407806db74;hb=HEAD;hp=46f0d4c3c4500206b594f428583404dff2283756;hpb=eaacb6175ec93b375518344283229817a008d577;p=debcargo-conf.git diff --git a/vars.sh.frag b/vars.sh.frag index 46f0d4c3c..38be71c80 100644 --- a/vars.sh.frag +++ b/vars.sh.frag @@ -16,6 +16,7 @@ cat <<'eof' >"$HOOK_COMMIT" if git rev-parse -q --verify MERGE_HEAD; then exit; fi case $(git rev-parse --abbrev-ref HEAD) in pending-*) true;; +proxmox/*) true;; *) if git diff --cached --name-only | \ grep '^src/.*/debian/changelog$' | \ while read x; do if ! [ -f "$x" ]; then continue; fi; echo "$x: $(head -n1 $x)"; done | \ @@ -43,6 +44,7 @@ case $dcver in 2.0.*|2.1.*|2.2.*|2.3.*) abort 1 "unsupported debcargo version $dcver. try reinstalling with \`cargo install debcargo --force\`";; 2.4.*) true;; 2.5.*) true;; +2.6.*) true;; *) abort 1 "unsupported debcargo version: $dcver";; esac @@ -69,6 +71,7 @@ PKGDIR_REL="src/$PKGNAME" PKGDIR="$PWD/$PKGDIR_REL" BUILDDIR="$PWD/build/$PKGNAME" PKGCFG="$PKGDIR/debian/debcargo.toml" +UPLOADER="${DEBFULLNAME:-$NAME} <${DEBEMAIL:-$EMAIL}>" mkdir -p "$(dirname $BUILDDIR)" ln -srf "$PWD/build.sh" "$PWD/build/build.sh" @@ -80,7 +83,19 @@ fi run_debcargo() { rm -rf "$BUILDDIR" "$(dirname "$BUILDDIR")/rust-${PKGNAME}_${REALVER:-$VER}"*.orig.tar.* + set +e $DEBCARGO package --config "$PKGCFG" --directory "$BUILDDIR" "$@" "$CRATE" "${REALVER:-$VER}" + if [ $? -ne 0 ]; then + echo "Command failed. If the patches failed to apply, to rebase them, run": + echo "cd $BUILDDIR" + echo "rm -rf .pc" + echo "ln -s $PKGDIR/debian/patches" + echo "quilt push -a" + echo "$EDITOR " + echo "quilt refresh" + exit 1 + fi + set -e } shouldbuild() {