From b29e5e62cc95cf0718ac27cd822aec359461e540 Mon Sep 17 00:00:00 2001 From: David Reveman Date: Fri, 3 Aug 2007 16:00:37 -0400 Subject: [PATCH] Add release documentation and makefile rules that will ease the release process (most of it stolen from cairo). --- Makefile.am | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++ RELEASING | 75 +++++++++++++++++++++++++++++++++++++++++++ configure.ac | 22 +++++++++++-- 3 files changed, 183 insertions(+), 3 deletions(-) create mode 100644 RELEASING diff --git a/Makefile.am b/Makefile.am index 1984f9059..21210fbe8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,3 +29,92 @@ endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = compiz.pc compiz-cube.pc compiz-scale.pc $(gconfdata) + +# Some custom targets to make it easier to release things. +# Use either: +# make release-check +# or make release-publish + +RELEASE_UPLOAD_HOST = xorg.freedesktop.org +RELEASE_UPLOAD_BASE = /srv/xorg.freedesktop.org/archive/individual/app +RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE) +RELEASE_URL_BASE = http://xorg.freedesktop.org/archive/individual/app +RELEASE_ANNOUNCE_LIST = compiz@list.freedesktop.org + +tar_file = $(PACKAGE)-$(VERSION).tar.gz +sha1_file = $(tar_file).sha1 +gpg_file = $(sha1_file).asc + +$(sha1_file): $(tar_file) + sha1sum $^ > $@ + +$(gpg_file): $(sha1_file) + @echo "Please enter your GPG password to sign the checksum." + gpg --armor --sign $^ + +release-verify-even-micro: + @echo -n "Checking that $(VERSION) has an even micro component..." + @test "$(COMPIZ_VERSION_MICRO)" = "`echo $(COMPIZ_VERSION_MICRO)/2*2 | bc`" \ + || (echo "Ouch." && echo "The version micro component '$(COMPIZ_VERSION_MICRO)' is not an even number." \ + && echo "The version in configure.in must be incremented before a new release." \ + && false) + @echo "Good." + +release-verify-newer: + @echo -n "Checking that no $(VERSION) release already exists..." + @ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \ + || (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \ + && echo "Are you sure you have an updated checkout?" \ + && echo "This should never happen." \ + && false) + @echo "Good." + +release-remove-old: + $(RM) $(tar_file) $(sha1_file) $(gpg_file) + +release-check: release-verify-even-micro release-verify-newer release-remove-old distcheck + +release-upload: release-check $(tar_file) $(sha1_file) $(gpg_file) + mkdir -p releases + scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR) + mv $(tar_file) $(sha1_file) $(gpg_file) releases + git-tag -s -m "compiz $(COMPIZ_VERSION_MAJOR).$(COMPIZ_VERSION_MINOR).$(COMPIZ_VERSION_MICRO) release" compiz-$(COMPIZ_VERSION_MAJOR).$(COMPIZ_VERSION_MINOR).$(COMPIZ_VERSION_MICRO) + +release-publish-message: releases/$(sha1_file) + @echo "Please follow the instructions in RELEASING to push stuff out and" + @echo "send out the announcement mails. Here is the excerpt you need:" + @echo "" + @echo "Subject: [ANNOUNCE] $(PACKAGE)-$(VERSION)" + @echo "" + @echo "============================== CUT HERE ==============================" + @echo "A new $(PACKAGE) release $(VERSION) is now available from:" + @echo "" + @echo " $(RELEASE_URL_BASE)/$(tar_file)" + @echo "" + @echo " which can be verified with:" + @echo "" + @echo " $(RELEASE_URL_BASE)/$(sha1_file)" + @echo -n " " + @cat releases/$(sha1_file) + @echo "" + @echo " $(RELEASE_URL_BASE)/$(gpg_file)" + @echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)" + @echo "" + @echo " Additionally, a git clone of the source tree:" + @echo "" + @echo " git clone git://git.freedesktop.org/git/xorg/app/compiz" + @echo "" + @echo " will include a signed $(VERSION) tag which points to a commit named:" + @echo " `git cat-file tag compiz-$(VERSION) | grep ^object | sed -e 's,object ,,'`" + @echo "" + @echo " which can be verified with:" + @echo " git verify-tag compiz-$(VERSION)" + @echo "" + @echo " and can be checked out with a command such as:" + @echo " git checkout -b build compiz-$(VERSION)" + @echo "" + @echo "============================== CUT HERE ==============================" + +release-publish: release-upload release-publish-message + +.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-check release-upload release-publish docs-publish diff --git a/RELEASING b/RELEASING new file mode 100644 index 000000000..0c278c6f4 --- /dev/null +++ b/RELEASING @@ -0,0 +1,75 @@ +Here are the steps to follow to create a new compiz release: + +1) Ensure that there are no local, uncommitted modifications. + It's probably good enough if "git diff HEAD" doesn't output + anything and your "master" and "origin" branches are at the + current revision. + +2) Verify that the code passes "make distcheck" + + Running "make distcheck" should result in no warnings or + errors and end with a message of the form: + + ============================================== + compiz-X.Y.Z archives ready for distribution: + compiz-X.Y.Z.tar.gz + ============================================== + + (But the tar file isn't actually ready yet, as we still have + some more steps to follow). + +3) Fill out an entry in the NEWS file + + Shift through the logs since the last release. This is most + easily done with a comand such as: + + git log --stat compiz-X.Y.Z.. + + where X.Y.Z is the previous release version. + + Summarize major changes briefly in a style similar to other + entries in NEWS. + +4) Increment version number in configure.ac: + + Increment to the micro version number to the next larger + (even) number. + +5) Commit the changes to NEWS and configure.ac + + It's especially important to mention the new version number in your + commit log. + +6) Run "make release-publish" which will perform the following steps + for you: + + * Check that the version number ends with an even micro component + * Check that no release exists with the current version + * Verify that make distcheck completes successfully + * Generate the final tar file + * Generate an sha1sum file + * Sign the sha1sum using your GPG setup (asks for your GPG password) + * scp the three files to appear on + http://xorg.freedesktop.org/archive/individual/app + * Place local copies of the three files in the releases directory + * Tag the entire source tree with a tag of the form compiz-X.Y.Z, and + sign the tag with your GPG key (asks for your GPG password, and you + may need to set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to match + your public-key's setting or this fails.) + * Provide some text for the release announcement (see below). + If for some reason you lost this message, + "make release-publish-message" prints it for you. + +7) Increment compiz_version_micro to the next larger (odd) number in + configure, commit, and push. + +8) Push the newly created tag out to the central tree with a command + something like: + + git push compiz-X.Y.Z + +9) Send a message to compiz@list.freedesktop.org to announce the + new release using the text provided from "make release-publish", + adding the excerpt from NEWS, your signature, followed by + tacking on the detailed changelog-ish thing that gets mailed + out when you push the tag (but not the diffstat thing). diff --git a/configure.ac b/configure.ac index 5cdb94ec6..52d456c51 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,24 @@ AC_PREREQ(2.57) -AC_INIT([compiz], [0.5.1], [davidr@novell.com]) - -AM_INIT_AUTOMAKE([dist-bzip2]) +dnl compiz package version number +dnl An odd micro number indicates in-progress development. +dnl An even micro number indicates a released version. +m4_define(compiz_version_major, 0) +m4_define(compiz_version_minor, 5) +m4_define(compiz_version_micro, 1) + +AC_INIT([compiz], + [compiz_version_major().compiz_version_minor().compiz_version_micro()], + [davidr@novell.com]) + +COMPIZ_VERSION_MAJOR=compiz_version_major() +COMPIZ_VERSION_MINOR=compiz_version_minor() +COMPIZ_VERSION_MICRO=compiz_version_micro() +AC_SUBST(COMPIZ_VERSION_MAJOR) +AC_SUBST(COMPIZ_VERSION_MINOR) +AC_SUBST(COMPIZ_VERSION_MICRO) + +AM_INIT_AUTOMAKE([1.7]) AC_CONFIG_HEADER([config.h]) AC_PROG_INTLTOOL([0.23]) AM_MAINTAINER_MODE -- GitLab