Do not do sponsored upload unless RFS exists

This commit is contained in:
Ian Jackson 2023-02-01 14:04:31 +00:00 committed by Matthias Geiger
parent cddbf0e431
commit 0648565918
2 changed files with 11 additions and 0 deletions

View File

@ -95,6 +95,16 @@ if head -n1 "$PKGDIR/debian/changelog" | grep -qv UNRELEASED-FIXME-AUTOGENERATED
" git push --delete origin $RELBRANCH"
fi
CHANGEDBY=$(dpkg-parsechangelog -l $PKGDIR/debian/changelog -SMaintainer)
if [ "$CHANGEDBY" != "$UPLOADER" ]; then
cat <<eof
Changes by $CHANGEDBY to be sponsored by $UPLOADER.
eof
if ! test -e $PKGDIR/debian/RFS; then
abort 1 "Sponsored upload, but $PKGDIR/debian/RFS does not exist"
fi
fi
( cd "$PKGDIR"
sed -i -e s/UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO/UNRELEASED/ debian/changelog
if test -z "$DISTRO"; then

View File

@ -70,6 +70,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"