mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
Backport release automation fixes (#3818)
* Refs #3646 -- Don't use shell globbing in our release script (#3809) * fix wheel building with parameters (#3808) * Refs #3646 -- invoke twine correctly (#3789)
This commit is contained in:
parent
2b6ade8087
commit
24fa217028
1 changed files with 7 additions and 5 deletions
12
release.py
12
release.py
|
|
@ -5,6 +5,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import getpass
|
||||
import glob
|
||||
import io
|
||||
import os
|
||||
import subprocess
|
||||
|
|
@ -106,10 +107,11 @@ def release(version):
|
|||
run("python", "setup.py", "sdist")
|
||||
run("python", "setup.py", "sdist", "bdist_wheel", cwd="vectors/")
|
||||
|
||||
run(
|
||||
"twine", "upload", "-s", "dist/cryptography-{0}*".format(version),
|
||||
"vectors/dist/cryptography_vectors-{0}*".format(version), shell=True
|
||||
packages = (
|
||||
glob.glob("dist/cryptography-{0}*".format(version)) +
|
||||
glob.glob("vectors/dist/cryptography_vectors-{0}*".format(version))
|
||||
)
|
||||
run("twine", "upload", "-s", *packages)
|
||||
|
||||
session = requests.Session()
|
||||
|
||||
|
|
@ -123,7 +125,7 @@ def release(version):
|
|||
|
||||
token = getpass.getpass("Input the Jenkins token: ")
|
||||
response = session.get(
|
||||
"{0}/build".format(JENKINS_URL),
|
||||
"{0}/buildWithParameters".format(JENKINS_URL),
|
||||
params={
|
||||
"token": token,
|
||||
"BUILD_VERSION": version,
|
||||
|
|
@ -133,7 +135,7 @@ def release(version):
|
|||
response.raise_for_status()
|
||||
wait_for_build_completed(session)
|
||||
paths = download_artifacts(session)
|
||||
run("twine", "upload", " ".join(paths))
|
||||
run("twine", "upload", *paths)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Reference in a new issue