Commit b29e5e62cc95cf0718ac27cd822aec359461e540

Authored by David Reveman
1 parent 0c14cb89

Add release documentation and makefile rules that will ease

the release process (most of it stolen from cairo).
Showing 3 changed files with 183 additions and 3 deletions   Show diff stats
Makefile.am
... ... @@ -29,3 +29,92 @@ endif
29 29  
30 30 pkgconfigdir = $(libdir)/pkgconfig
31 31 pkgconfig_DATA = compiz.pc compiz-cube.pc compiz-scale.pc $(gconfdata)
  32 +
  33 +# Some custom targets to make it easier to release things.
  34 +# Use either:
  35 +# make release-check
  36 +# or make release-publish
  37 +
  38 +RELEASE_UPLOAD_HOST = xorg.freedesktop.org
  39 +RELEASE_UPLOAD_BASE = /srv/xorg.freedesktop.org/archive/individual/app
  40 +RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)
  41 +RELEASE_URL_BASE = http://xorg.freedesktop.org/archive/individual/app
  42 +RELEASE_ANNOUNCE_LIST = compiz@list.freedesktop.org
  43 +
  44 +tar_file = $(PACKAGE)-$(VERSION).tar.gz
  45 +sha1_file = $(tar_file).sha1
  46 +gpg_file = $(sha1_file).asc
  47 +
  48 +$(sha1_file): $(tar_file)
  49 + sha1sum $^ > $@
  50 +
  51 +$(gpg_file): $(sha1_file)
  52 + @echo "Please enter your GPG password to sign the checksum."
  53 + gpg --armor --sign $^
  54 +
  55 +release-verify-even-micro:
  56 + @echo -n "Checking that $(VERSION) has an even micro component..."
  57 + @test "$(COMPIZ_VERSION_MICRO)" = "`echo $(COMPIZ_VERSION_MICRO)/2*2 | bc`" \
  58 + || (echo "Ouch." && echo "The version micro component '$(COMPIZ_VERSION_MICRO)' is not an even number." \
  59 + && echo "The version in configure.in must be incremented before a new release." \
  60 + && false)
  61 + @echo "Good."
  62 +
  63 +release-verify-newer:
  64 + @echo -n "Checking that no $(VERSION) release already exists..."
  65 + @ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \
  66 + || (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \
  67 + && echo "Are you sure you have an updated checkout?" \
  68 + && echo "This should never happen." \
  69 + && false)
  70 + @echo "Good."
  71 +
  72 +release-remove-old:
  73 + $(RM) $(tar_file) $(sha1_file) $(gpg_file)
  74 +
  75 +release-check: release-verify-even-micro release-verify-newer release-remove-old distcheck
  76 +
  77 +release-upload: release-check $(tar_file) $(sha1_file) $(gpg_file)
  78 + mkdir -p releases
  79 + scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)
  80 + mv $(tar_file) $(sha1_file) $(gpg_file) releases
  81 + 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)
  82 +
  83 +release-publish-message: releases/$(sha1_file)
  84 + @echo "Please follow the instructions in RELEASING to push stuff out and"
  85 + @echo "send out the announcement mails. Here is the excerpt you need:"
  86 + @echo ""
  87 + @echo "Subject: [ANNOUNCE] $(PACKAGE)-$(VERSION)"
  88 + @echo ""
  89 + @echo "============================== CUT HERE =============================="
  90 + @echo "A new $(PACKAGE) release $(VERSION) is now available from:"
  91 + @echo ""
  92 + @echo " $(RELEASE_URL_BASE)/$(tar_file)"
  93 + @echo ""
  94 + @echo " which can be verified with:"
  95 + @echo ""
  96 + @echo " $(RELEASE_URL_BASE)/$(sha1_file)"
  97 + @echo -n " "
  98 + @cat releases/$(sha1_file)
  99 + @echo ""
  100 + @echo " $(RELEASE_URL_BASE)/$(gpg_file)"
  101 + @echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
  102 + @echo ""
  103 + @echo " Additionally, a git clone of the source tree:"
  104 + @echo ""
  105 + @echo " git clone git://git.freedesktop.org/git/xorg/app/compiz"
  106 + @echo ""
  107 + @echo " will include a signed $(VERSION) tag which points to a commit named:"
  108 + @echo " `git cat-file tag compiz-$(VERSION) | grep ^object | sed -e 's,object ,,'`"
  109 + @echo ""
  110 + @echo " which can be verified with:"
  111 + @echo " git verify-tag compiz-$(VERSION)"
  112 + @echo ""
  113 + @echo " and can be checked out with a command such as:"
  114 + @echo " git checkout -b build compiz-$(VERSION)"
  115 + @echo ""
  116 + @echo "============================== CUT HERE =============================="
  117 +
  118 +release-publish: release-upload release-publish-message
  119 +
  120 +.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-check release-upload release-publish docs-publish
... ...
RELEASING 0 → 100644
... ... @@ -0,0 +1,75 @@
  1 +Here are the steps to follow to create a new compiz release:
  2 +
  3 +1) Ensure that there are no local, uncommitted modifications.
  4 + It's probably good enough if "git diff HEAD" doesn't output
  5 + anything and your "master" and "origin" branches are at the
  6 + current revision.
  7 +
  8 +2) Verify that the code passes "make distcheck"
  9 +
  10 + Running "make distcheck" should result in no warnings or
  11 + errors and end with a message of the form:
  12 +
  13 + ==============================================
  14 + compiz-X.Y.Z archives ready for distribution:
  15 + compiz-X.Y.Z.tar.gz
  16 + ==============================================
  17 +
  18 + (But the tar file isn't actually ready yet, as we still have
  19 + some more steps to follow).
  20 +
  21 +3) Fill out an entry in the NEWS file
  22 +
  23 + Shift through the logs since the last release. This is most
  24 + easily done with a comand such as:
  25 +
  26 + git log --stat compiz-X.Y.Z..
  27 +
  28 + where X.Y.Z is the previous release version.
  29 +
  30 + Summarize major changes briefly in a style similar to other
  31 + entries in NEWS.
  32 +
  33 +4) Increment version number in configure.ac:
  34 +
  35 + Increment to the micro version number to the next larger
  36 + (even) number.
  37 +
  38 +5) Commit the changes to NEWS and configure.ac
  39 +
  40 + It's especially important to mention the new version number in your
  41 + commit log.
  42 +
  43 +6) Run "make release-publish" which will perform the following steps
  44 + for you:
  45 +
  46 + * Check that the version number ends with an even micro component
  47 + * Check that no release exists with the current version
  48 + * Verify that make distcheck completes successfully
  49 + * Generate the final tar file
  50 + * Generate an sha1sum file
  51 + * Sign the sha1sum using your GPG setup (asks for your GPG password)
  52 + * scp the three files to appear on
  53 + http://xorg.freedesktop.org/archive/individual/app
  54 + * Place local copies of the three files in the releases directory
  55 + * Tag the entire source tree with a tag of the form compiz-X.Y.Z, and
  56 + sign the tag with your GPG key (asks for your GPG password, and you
  57 + may need to set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to match
  58 + your public-key's setting or this fails.)
  59 + * Provide some text for the release announcement (see below).
  60 + If for some reason you lost this message,
  61 + "make release-publish-message" prints it for you.
  62 +
  63 +7) Increment compiz_version_micro to the next larger (odd) number in
  64 + configure, commit, and push.
  65 +
  66 +8) Push the newly created tag out to the central tree with a command
  67 + something like:
  68 +
  69 + git push compiz-X.Y.Z
  70 +
  71 +9) Send a message to compiz@list.freedesktop.org to announce the
  72 + new release using the text provided from "make release-publish",
  73 + adding the excerpt from NEWS, your signature, followed by
  74 + tacking on the detailed changelog-ish thing that gets mailed
  75 + out when you push the tag (but not the diffstat thing).
... ...
configure.ac
1 1 AC_PREREQ(2.57)
2 2  
3   -AC_INIT([compiz], [0.5.1], [davidr@novell.com])
4   -
5   -AM_INIT_AUTOMAKE([dist-bzip2])
  3 +dnl compiz package version number
  4 +dnl An odd micro number indicates in-progress development.
  5 +dnl An even micro number indicates a released version.
  6 +m4_define(compiz_version_major, 0)
  7 +m4_define(compiz_version_minor, 5)
  8 +m4_define(compiz_version_micro, 1)
  9 +
  10 +AC_INIT([compiz],
  11 + [compiz_version_major().compiz_version_minor().compiz_version_micro()],
  12 + [davidr@novell.com])
  13 +
  14 +COMPIZ_VERSION_MAJOR=compiz_version_major()
  15 +COMPIZ_VERSION_MINOR=compiz_version_minor()
  16 +COMPIZ_VERSION_MICRO=compiz_version_micro()
  17 +AC_SUBST(COMPIZ_VERSION_MAJOR)
  18 +AC_SUBST(COMPIZ_VERSION_MINOR)
  19 +AC_SUBST(COMPIZ_VERSION_MICRO)
  20 +
  21 +AM_INIT_AUTOMAKE([1.7])
6 22 AC_CONFIG_HEADER([config.h])
7 23 AC_PROG_INTLTOOL([0.23])
8 24 AM_MAINTAINER_MODE
... ...