]> git.proxmox.com Git - debcargo-conf.git/commitdiff
More instructions for release
authorXimin Luo <infinity0@debian.org>
Sat, 9 Jun 2018 04:21:24 +0000 (21:21 -0700)
committerXimin Luo <infinity0@debian.org>
Sat, 9 Jun 2018 04:21:24 +0000 (21:21 -0700)
release.sh
update.sh
vars.sh.frag

index ba1244787a7f945899266d56a795989786acfa4f..3df3b1fd2626ebece37297652fc8568be38d9c28 100755 (executable)
@@ -2,9 +2,15 @@
 
 . ./vars.sh.frag
 
-git diff -q -- "$PKGDIR_REL" || \
+git diff --quiet --cached || \
+abort 1 "You have other pending changes to git, please complete it or stash it away and re-run this script."
+
+git diff --quiet -- "$PKGDIR_REL" || \
 abort 1 "Please git-add your changes to $PKGDIR_REL before running"
 
+head -n1 "$PKGDIR/debian/changelog" | grep -q UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO || \
+abort 1 "Package already released. If that was a mistake and you didn't actually upload yet, you may rewind your git and re-run this script."
+
 ( cd "$PKGDIR"
 sed -i -e s/UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO/UNRELEASED/ debian/changelog
 dch -r -D unstable ""
@@ -20,3 +26,25 @@ abort 1 "cannot release, update resulted in git diffs to $PKGDIR_REL"
 git commit -m "Release package $PKG"
 
 ( cd "$BUILDDIR" && dpkg-buildpackage -d -S --no-sign )
+
+cat >&2 <<eof
+Release of $PKG ready as a source package in ${BUILDDIR#$PWD/}.
+
+If the source package is already in Debian and this version does not introduce
+new binaries, then you can just go ahead and directly dput the source package.
+
+If this is a NEW source package or introduces NEW binary packages not already
+in the Debian archive, you will need to build a binary package out of it. The
+recommended way is to run something like:
+
+$ sbuild <source_package.dsc>
+$ changestool <sbuild_binary_changes.changes> addsc <source_package.dsc>
+$ debsign --no-re-sign <sbuild_binary_changes.changes>
+$ dput <sbuild_binary_changes.changes>
+
+See https://wiki.debian.org/sbuild for instructions on how to set it up. The
+other tools are from the 'devscripts' package.
+
+The above assumes you are a Debian Developer. If not, you should revert your
+changes and ask a Debian Developer to do this step.
+eof
index 1f4ab9357ecc3f00f99ce07f2e5cfae35be8c9a1..e9c96d074f21243cd5a11382df86c36ab39b1163 100755 (executable)
--- a/update.sh
+++ b/update.sh
@@ -11,10 +11,10 @@ if [ ! -f "$PKGDIR/debian/copyright" ]; then
        echo "FIXME fill me in using ./copyright.debcargo.hint as a guide" > "$PKGDIR/debian/copyright"
 fi
 
-rm -rf "$BUILDDIR" && mkdir -p "$(dirname $BUILDDIR)"
+rm -rf "$BUILDDIR"
 $DEBCARGO package --config "$PKGCFG" --directory "$BUILDDIR" "$PKG" "$VER"
 
-if ! git diff -q -- "$PKGDIR_REL"; then
+if ! git diff --quiet -- "$PKGDIR_REL"; then
        read -p "Update wrote some changes to $PKGDIR_REL, press enter to git diff..." x
        git diff -- "$PKGDIR_REL"
 fi
index 8a245582852fd4b3d1a8a3ce8c585b89d0caa35f..dc89bebbae1329abf173bb2b09bf1db45c9383ab 100644 (file)
@@ -22,3 +22,9 @@ PKGDIR_REL="src/$PKGNAME"
 PKGDIR="$PWD/$PKGDIR_REL"
 BUILDDIR="$PWD/build/$PKGNAME"
 PKGCFG="$PKGDIR/debian/debcargo.toml"
+
+mkdir -p "$(dirname $BUILDDIR)"
+
+if [ -z "$PKG" ]; then
+       abort 2 "Usage: $0 <package> [<version>]"
+fi