# HG changeset patch # User Jim Meyering # Date 1262273471 -3600 # Node ID dafd055586ef4692674c2d784f181d7f9486689f # Parent a8059f620e8f2b49e388dc6951caf604d5b74717 maint.mk: don't require explicit gpg_key_ID in cfg.mk * top/maint.mk (gpg_key_ID): Derive key ID from signed release tag. With this change, we can all remove the gpg_key_ID = ... definition from our respective cfg.mk files. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-12-31 Jim Meyering + maint.mk: don't require explicit gpg_key_ID in cfg.mk + * top/maint.mk (gpg_key_ID): Derive key ID from signed release tag. + With this change, we can all remove the gpg_key_ID = ... definition + from our respective cfg.mk files. + maint.mk: create announcement template in ~/, not in /tmp * top/maint.mk (emit_upload_commands): Adjust. (release-prep): Emit into ~/announce-..., not /tmp/announce-... diff --git a/top/maint.mk b/top/maint.mk --- a/top/maint.mk +++ b/top/maint.mk @@ -30,7 +30,6 @@ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable) GZIP_ENV = '--no-name --best $(gzip_rsyncable)' -# cfg.mk must define the gpg_key_ID used by this package. GIT = git VC = $(GIT) VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' @@ -688,6 +687,13 @@ gnulib-version = $$(cd $(gnulib_dir) && git describe) bootstrap-tools ?= autoconf,automake,gnulib +# If it's not already specified, derive the GPG key ID from +# the signed tag we've just applied to mark this release. +gpg_key_ID ?= \ + $$(git cat-file tag v$(VERSION) > .ann-sig \ + && gpgv .ann-sig - < /dev/null 2>&1 \ + | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig) + announcement: NEWS ChangeLog $(rel-files) @$(build_aux)/announce-gen \ --release-type=$(RELEASE_TYPE) \