From 8f29e112aa5041293516be385d1c088bac3d6dbd Mon Sep 17 00:00:00 2001 From: intrigeri <intrigeri@boum.org> Date: Tue, 5 Sep 2017 14:47:08 +0000 Subject: [PATCH] Automate and document more of the release process. --- RELEASE.md | 95 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 35 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index d9d559e..df6dd92 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,59 +1,84 @@ Upstream ======== -* update version in `configure.in` +* prepare the environment: -* update first line of `ChangeLog` + export VERSION=x.y.z -* commit: +* update `configure.in` and `ChangeLog` - git commit configure.in ChangeLog \ - -m "Releasing backupninja $VERSION" + perl -pi -E \ + "s{^AC_INIT\(\[backupninja\],\[[0-9.]+\],}{AC_INIT([backupninja],[$VERSION],}" \ + configure.in && \ + RELEASE_DATE=$(LC_ALL=C date '+%B %d, %Y') perl -pi -E \ + "s{^version\s+[0-9.]+\s+--\s+UNRELEASED$}{version $VERSION -- $RELEASE_DATE}" \ + ChangeLog -* create the tarball: +* commit, tag and create the tarball: + git commit configure.in ChangeLog \ + -m "Releasing backupninja $VERSION" && \ + git clean -fdx && \ git tag -s "backupninja-$VERSION" \ - -m "Releasing backupninja $VERSION" - ./autogen.sh - ./configure + -m "Releasing backupninja $VERSION" && \ + ./autogen.sh && \ + ./configure && \ make dist * compare the content of the generated tarball with the content of the previous one -* `mv backupninja-$VERSION.tar.gz ../tarballs/` +* move the tarball outside of the Git working copy and clean up: + + mkdir -p ../tarballs && \ + mv backupninja-$VERSION.tar.gz ../tarballs/ && \ + make distclean && \ + git clean -fdx -* cleanup: `make distclean` +* Install (extract tarball, `.configure && make && sudo make install`) + and test. + +Debian +====== -* sign the release: +Prepare a new package: - cd ../tarballs - gpg --armor --detach-sign backupninja-$VERSION.tar.gz + git checkout debian && \ + gbp import-orig --upstream-vcs-tag="backupninja-$VERSION" \ + ../tarballs/backupninja-$VERSION.tar.gz && \ + gbp dch --auto && \ + dch -e && \ + export DEBIAN_VERSION=$(dpkg-parsechangelog -SVersion) && \ + git commit debian/changelog \ + -m "Releasing backupninja ($DEBIAN_VERSION) to Debian unstable" && \ + gbp buildpackage -* upload the generated tarball and detached signature to - https://0xacab.org/riseuplabs/backupninja/ +Install the `.deb` and test. -* push master branch and tags: +Release +======= - git push origin master --follow-tags +* sign the release and push it to Git: -* announce on the backupninja mailing-list + gpg --armor --detach-sign \ + ../tarballs/backupninja-$VERSION.tar.gz && \ + git checkout debian && \ + gbp buildpackage --git-tag-only --git-sign-tags && \ + git push --follow-tags origin \ + master:master \ + debian:debian \ + pristine-tar:pristine-tar \ + upstream:upstream -Debian -====== +* upload the upstream tarball and detached signature to the GitLab + milestone page with *Edit* → *Attach a file* +* announce the release on the backupninja mailing-list, + pointing to the milestone web page +* upload to Debian or ask someone listed in the `Uploaders` control + field to review and upload - ln -s backupninja-$VERSION.tar.gz backupninja_$VERSION.orig.tar.gz - cd ../git - git checkout debian - gbp import-orig --upstream-vcs-tag="backupninja-$VERSION" \ - ../tarballs/backupninja-$VERSION.tar.gz - gbp dch --auto - dch -e - git commit debian/changelog -m "Releasing backupninja ($DEBIAN_VERSION) to Debian unstable" - git tag -s -m "Releasing backupninja ($DEBIAN_VERSION) to Debian unstable" backupninja_debian/$DEBIAN_VERSION - gbp buildpackage +Open the next development cycle +=============================== -* push the `debian` branch -* publish the source package somewhere -* ask someone listed in the `Uploaders` control field to review and upload -* push the tag, once uploaded to Debian +* `git checkout master` +* Add an empty new section in `ChangeLog`, commit and push. -- GitLab