Skip to content

Commit a3d5a37

Browse files
lukpuehjoshuagl
authored andcommitted
build: minor style/wording fixes in verify_release
Co-authored-by: Joshua Lock <[email protected]> Signed-off-by: Lukas Puehringer <[email protected]>
1 parent 8167889 commit a3d5a37

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

docs/RELEASE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ on GitHub
4545

4646
8. Run `verify_release` to make sure the PyPI release artifacts match the local build as
4747
well. When called as `verify_release --sign [<key id>]` the script additionally
48-
creates gpg release signatures. These signature files should be made available on the
49-
GitHub release page under Assets.
48+
creates gpg release signatures. When signed by maintainers with a corresponding GPG
49+
fingerprint in the MAINTAINERS.md file, these signature files should be made available on
50+
the GitHub release page under Assets.
5051
9. Announce the release on [#tuf on CNCF Slack](https://cloud-native.slack.com/archives/C8NMD3QJ3)
5152
10. Ensure [POUF 1](https://github.com/theupdateframework/taps/blob/master/POUFs/reference-POUF/pouf1.md),
5253
for the reference implementation, is up-to-date

verify_release

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ def sign_release_artifacts(
126126
version: str, build_dir: str, key_id: str = None
127127
) -> None:
128128
"""Sign built release artifacts with gpg and write signature files to cwd"""
129-
tar = f"{PYPI_PROJECT}-{version}.tar.gz"
129+
sdist = f"{PYPI_PROJECT}-{version}.tar.gz"
130130
wheel = f"{PYPI_PROJECT}-{version}-py3-none-any.whl"
131131
cmd = ["gpg", "--detach-sign", "--armor"]
132132

133133
if key_id is not None:
134134
cmd += ["--local-user", key_id]
135135

136-
for filename in [tar, wheel]:
136+
for filename in [sdist, wheel]:
137137
artifact_path = os.path.join(build_dir, filename)
138138
signature_path = f"{filename}.asc"
139139
subprocess.run(
@@ -216,14 +216,12 @@ def main() -> int:
216216
if args.sign:
217217
progress("Signing built release with gpg")
218218
if success:
219-
key_id = None
220-
if args.sign is not True:
221-
key_id = args.sign
219+
key_id = args.sign if args.sign is not True else None
222220

223221
sign_release_artifacts(build_version, build_dir, key_id)
224222
finished("Created signatures in cwd (see '*.asc' files)")
225223
else:
226-
finished("WARNING: Skip signing of non-matching artifacts")
224+
finished("WARNING: Skipped signing of non-matching artifacts")
227225

228226
return 0 if success else 1
229227

0 commit comments

Comments
 (0)