Author: dsahlberg
Date: Thu Jul 14 19:40:57 2022
New Revision: 1902722
URL: http://svn.apache.org/viewvc?rev=1902722&view=rev
Log:
Follow-up to r1902582: Improvements to the release.py script
Suggested by: danielsh
* tools/dist/make-keys.sh:
Make the -c argument expect the NAME of the COMMITTERS file, to make it
easier in the future to point to a file with another (temporary) name.
* tools/dist/release.py
(get_keys): Better use of NamedTemporaryFile. Doesn't work on Windows
(according to Python docs) but there are other release process
requirements mandating the use of *nix so it should be ok.
Modified:
subversion/trunk/tools/dist/make-keys.sh
subversion/trunk/tools/dist/release.py
Modified: subversion/trunk/tools/dist/make-keys.sh
URL:
http://svn.apache.org/viewvc/subversion/trunk/tools/dist/make-keys.sh?rev=1902722&r1=1902721&r2=1902722&view=diff
==============================================================================
--- subversion/trunk/tools/dist/make-keys.sh (original)
+++ subversion/trunk/tools/dist/make-keys.sh Thu Jul 14 19:40:57 2022
@@ -26,21 +26,21 @@ while getopts ":c:o:h" ARG; do
o) OUTPUT=$OPTARG ;;
h) echo "USAGE: $0 [-c PATH/TO/COMMITTERS] [-o PATH/TO/OUTPUT/KEYS]
[-h]";
echo "";
- echo "-c Set the path to the COMMITTERS file. Default current
directory.";
+ echo "-c Set the path/name to the COMMITTERS file. Default current
directory/COMMITTERS.";
echo "-o Set the path/name of the resulting KEYS file. Default
current directory/KEYS.";
echo "-h Display this message";
return ;;
esac
done
-if [ ! -f $COMMITTERS/COMMITTERS ]; then
+if [ ! -f $COMMITTERS ]; then
echo "COMMITTERS file not found."
exit 1
fi
cd $TMP
-for availid in $( perl -anE 'say $F[0] if (/^Blanket/../END ACTIVE
FULL.*SCRIPTS LOOK FOR IT/ and /@/)' < $COMMITTERS/COMMITTERS )
+for availid in $( perl -anE 'say $F[0] if (/^Blanket/../END ACTIVE
FULL.*SCRIPTS LOOK FOR IT/ and /@/)' < $COMMITTERS )
do
key_url=https://people.apache.org/keys/committer/${availid}.asc
Modified: subversion/trunk/tools/dist/release.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1902722&r1=1902721&r2=1902722&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Thu Jul 14 19:40:57 2022
@@ -1469,11 +1469,10 @@ def check_sigs(args):
def get_keys(args):
'Import the LDAP-based KEYS file to gpg'
- with tempfile.NamedTemporaryFile(delete=False) as tmpfile:
+ with tempfile.NamedTemporaryFile() as tmpfile:
keyspath = tmpfile.name
- subprocess.check_call([os.path.dirname(__file__) + '/make-keys.sh', '-c',
os.path.dirname(__file__) + '/../..', '-o', keyspath])
- subprocess.check_call(['gpg', '--import', keyspath])
- os.remove(keyspath)
+ subprocess.check_call([os.path.dirname(__file__) + '/make-keys.sh',
'-c', os.path.dirname(__file__) + '/../../COMMITTERS', '-o', keyspath])
+ subprocess.check_call(['gpg', '--import', keyspath])
def add_to_changes_dict(changes_dict, audience, section, change, revision):
# Normalize arguments