Author: luke1410 Date: Wed Apr 11 22:17:56 2018 New Revision: 1828939 URL: http://svn.apache.org/viewvc?rev=1828939&view=rev Log: Add support to release.py to sign candidates with non default user ids.
* subversion/trunk/tools/dist/release.py (sign_candidates): Add userid handling, if specified. (main): Add --userid option to sign-candidates subcommand. Modified: subversion/trunk/tools/dist/release.py Modified: subversion/trunk/tools/dist/release.py URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1828939&r1=1828938&r2=1828939&view=diff ============================================================================== --- subversion/trunk/tools/dist/release.py (original) +++ subversion/trunk/tools/dist/release.py Wed Apr 11 22:17:56 2018 @@ -737,8 +737,12 @@ def sign_candidates(args): def sign_file(filename): asc_file = open(filename + '.asc', 'a') logging.info("Signing %s" % filename) - proc = subprocess.check_call(['gpg', '-ba', '-o', '-', filename], - stdout=asc_file) + if args.userid: + proc = subprocess.check_call(['gpg', '-ba', '-u', args.userid, + '-o', '-', filename], stdout=asc_file) + else: + proc = subprocess.check_call(['gpg', '-ba', '-o', '-', filename], + stdout=asc_file) asc_file.close() target = get_target(args) @@ -1399,6 +1403,10 @@ def main(): subparser.add_argument('--target', help='''The full path to the directory containing release artifacts.''') + subparser.add_argument('--userid', + help='''The (optional) USER-ID specifying the key to be + used for signing, such as '110B1C95' (Key-ID). If + omitted, uses the default key.''') # Setup the parser for the post-candidates subcommand subparser = subparsers.add_parser('post-candidates',