Public Access
Release 26.3.0.1 with live Reborn views and random page policies
Build / build (push) Waiting to run
Build / build (push) Waiting to run
This commit is contained in:
1 parent
f9097967b9
commit
41daff1e61
59 files changed
+1997
-148
No files matched your search
@@ -180,11 +180,27 @@ def publish_curseforge(metadata: dict, jar: Path) -> None:
|
||||
print(f"CurseForge: https://www.curseforge.com/minecraft/mc-mods/rivencraft/files/{result['id']} (pending approval)")
|
||||
|
||||
|
||||
def release_identity(version: str, minecraft: str, channel: str) -> tuple[str, str]:
|
||||
"""New releases prefix the version with Minecraft; retain old beta upload support."""
|
||||
if version.startswith(minecraft + "."):
|
||||
base, separator, suffix = version.partition("-")
|
||||
counters = base[len(minecraft) + 1:].split(".")
|
||||
if len(counters) != 2 or not all(value.isdecimal() for value in counters):
|
||||
raise RuntimeError("Expected Minecraft.release-slice.iteration version")
|
||||
if channel == "release":
|
||||
if separator:
|
||||
raise RuntimeError("Regular releases must not have a prerelease suffix")
|
||||
elif not separator or suffix != f"{channel}.1":
|
||||
raise RuntimeError("Prerelease version must end in the selected channel and .1")
|
||||
return f"V{version}", f"rivencraft-{version}.jar"
|
||||
base, separator, suffix = version.partition("-")
|
||||
if not separator or suffix != f"{channel}.1":
|
||||
raise RuntimeError("Legacy upload requires a selected-channel .1 suffix")
|
||||
return f"V{base}-mc{minecraft}-{suffix}", f"rivencraft-{minecraft}-{version}.jar"
|
||||
|
||||
|
||||
def publish_gitea(args: argparse.Namespace) -> None:
|
||||
base_version, suffix = args.version.split("-", 1)
|
||||
if suffix != f"{args.channel}.1":
|
||||
raise RuntimeError("Gitea tag convention requires a version ending in the selected channel and .1")
|
||||
tag = f"V{base_version}-mc{args.minecraft}-{suffix}"
|
||||
tag, _ = release_identity(args.version, args.minecraft, args.channel)
|
||||
# The release must refer to a tag already pushed by the normal Git workflow.
|
||||
remote_tag = subprocess.run(
|
||||
["git", "ls-remote", "origin", f"refs/tags/{tag}"],
|
||||
@@ -197,7 +213,7 @@ def publish_gitea(args: argparse.Namespace) -> None:
|
||||
release_url = f"{GITEA_API}/releases/tags/{tag}"
|
||||
release = request_json(release_url, token=token, not_found_ok=True)
|
||||
notes = args.changelog.read_text(encoding="utf-8")
|
||||
title = f"Rivencraft {args.minecraft} {args.channel} {args.version}"
|
||||
title = args.name
|
||||
if release is None:
|
||||
metadata = {
|
||||
"tag_name": tag,
|
||||
@@ -257,7 +273,8 @@ def main() -> None:
|
||||
raise RuntimeError(f"Changelog does not exist: {args.changelog}")
|
||||
if args.minecraft != "26.3":
|
||||
raise RuntimeError("Only the 26.3 line is configured; 1.21.1 needs required dependency relations")
|
||||
if args.jar.name != f"rivencraft-{args.minecraft}-{args.version}.jar":
|
||||
_, expected_filename = release_identity(args.version, args.minecraft, args.channel)
|
||||
if args.jar.name != expected_filename:
|
||||
raise RuntimeError("JAR filename does not match Minecraft and release versions")
|
||||
modrinth, curseforge = release_metadata(args)
|
||||
sites = SITES if args.site == "all" else (("modrinth", "curseforge") if args.site == "both" else (args.site,))
|
||||
|
||||
Reference in new issue
Block a user