Allow GPG keys with no spaces
authorAlan Woodward <romseygeek@apache.org>
Mon, 11 Feb 2019 17:05:50 +0000 (17:05 +0000)
committerAlan Woodward <romseygeek@apache.org>
Tue, 12 Feb 2019 09:02:03 +0000 (09:02 +0000)
dev-tools/scripts/buildAndPushRelease.py

index 98547c4..9f25f16 100644 (file)
@@ -314,7 +314,7 @@ def check_key_in_keys(gpgKeyID, local_keys):
       gpgKeyID40Char = "%s %s %s %s %s  %s %s %s %s %s" % \
                        (gpgKeyID[0:4], gpgKeyID[4:8], gpgKeyID[8:12], gpgKeyID[12:16], gpgKeyID[16:20],
                        gpgKeyID[20:24], gpgKeyID[24:28], gpgKeyID[28:32], gpgKeyID[32:36], gpgKeyID[36:])
-      re_to_match = r"^pub .*\n\s+%s" % gpgKeyID40Char
+      re_to_match = r"^pub .*\n\s+(%s|%s)" % (gpgKeyID40Char, gpgKeyID)
     else:
       print('Invalid gpg key id format. Must be 8 byte short ID or 40 byte fingerprint, with or without 0x prefix, no spaces.')
       exit(2)