Skip to content

Commit 778d6e2

Browse files
authored
chore: only bump OpenSSL to 3.0.x (current LTS version) (#358)
1 parent a3eb391 commit 778d6e2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

noxfile.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def docs(session: nox.Session) -> str:
7676
print("Unsupported argument to docs")
7777

7878

79-
def _bump(session: nox.Session, name: str, repository: str, script: str, files) -> None:
79+
def _bump(session: nox.Session, name: str, repository: str, branch: str, script: str, files) -> None:
8080
parser = argparse.ArgumentParser()
8181
parser.add_argument(
8282
"--commit", action="store_true", help="Make a branch and commit."
@@ -88,7 +88,11 @@ def _bump(session: nox.Session, name: str, repository: str, script: str, files)
8888

8989
if args.version is None:
9090
session.install("lastversion")
91-
version = session.run("lastversion", repository, log=False, silent=True).strip()
91+
lastversion_args = []
92+
if branch:
93+
lastversion_args.extend(("--branch", branch))
94+
lastversion_args.append(repository)
95+
version = session.run("lastversion", *lastversion_args, log=False, silent=True).strip()
9296
else:
9397
version = args.version
9498

@@ -118,7 +122,7 @@ def bump(session: nox.Session) -> None:
118122
"tests/test_distribution.py",
119123
"docs/update_cmake_version.rst",
120124
)
121-
_bump(session, "CMake", "kitware/cmake", "scripts/update_cmake_version.py", files)
125+
_bump(session, "CMake", "kitware/cmake", "", "scripts/update_cmake_version.py", files)
122126

123127

124128
@nox.session(name="bump-openssl")
@@ -129,4 +133,4 @@ def bump_openssl(session: nox.Session) -> None:
129133
files = (
130134
"scripts/manylinux-build-and-install-openssl.sh",
131135
)
132-
_bump(session, "OpenSSL", "openssl/openssl", "scripts/update_openssl_version.py", files)
136+
_bump(session, "OpenSSL", "openssl/openssl", "3.0", "scripts/update_openssl_version.py", files)

0 commit comments

Comments
 (0)