Release: enforce root version across component feeds

This commit is contained in:
faumaray committed 2026-07-28 21:41:55 +03:00
1 parent f78004e822
commit 1305d37fae
6 files changed
+139 -7

No files matched your search

+12 -3
View File
@@ -672,11 +672,12 @@ def derive_nightly_version(arguments: argparse.Namespace, api: GiteaApi) -> None
(int(match.group(1)), int(match.group(2)), int(match.group(3)))
)
cmake_version = cmake_project_version(arguments.cmake_file)
next_released_version = cmake_version
if released_versions:
major, minor, patch = max(released_versions)
patch += 1
else:
major, minor, patch = cmake_project_version(arguments.cmake_file)
next_released_version = major, minor, patch + 1
major, minor, patch = max(cmake_version, next_released_version)
version = (
f"{major}.{minor}.{patch}-nightly."
f"{arguments.date_id}.{arguments.run_number}"
@@ -726,11 +727,19 @@ def parser() -> argparse.ArgumentParser:
nightly_version_parser.add_argument("--cmake-file", type=Path, required=True)
nightly_version_parser.add_argument("--date-id", required=True)
nightly_version_parser.add_argument("--run-number", required=True)
project_version_parser = subparsers.add_parser("cmake-project-version")
project_version_parser.add_argument(
"--cmake-file", type=Path, required=True
)
return result
def main() -> None:
arguments = parser().parse_args()
if arguments.command == "cmake-project-version":
print(".".join(map(str, cmake_project_version(arguments.cmake_file))))
return
if arguments.command == "prune-nightlies" and arguments.keep < 1:
fail("--keep must be positive")
if arguments.command == "prune-nightlies":