Compare commits

..
Author SHA1 Message Date
layue13andClaude Sonnet 5.5 237c05f652 ci: delete the old generic package file right before re-uploading it
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Publish TDLM launcher / publish (push) Skipped
Publish TDLM launcher / noop (push) Successful in 1s
Java CI / build (pull_request) Successful in 7m28s
The second publish failed with HTTP 409 (package file already exists) because Gitea does not overwrite
a generic package file. The previous copy of each file is now deleted just before its upload.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-10 16:37:59 +08:00
layue13 f5d739711d fix: default client fileApi is the Nexus raw tdlm-client (#20)
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (push) Successful in 8m14s
Co-authored-by: Layue13 <[email protected]>
2026-11-10 08:28:39 +00:00
layue13 87b5efa64b fix: bake default join address mc.potatolab.uk (#18)
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Publish TDLM launcher / publish (push) Skipped
Publish TDLM launcher / noop (push) Successful in 5s
Java CI / build (push) Successful in 11m49s
fix: bake default join address mc.potatolab.uk
2026-11-09 22:16:08 +00:00
3 changed files with 23 additions and 2 deletions

No files matched your search

+11
View File
@@ -138,6 +138,17 @@ jobs:
def put(name: str, data: bytes):
url = upload_root + "/" + urllib.parse.quote(name, safe="")
# Gitea refuses to overwrite a generic package file (HTTP 409), so the previous copy of this one
# file is deleted right before it is uploaded again (keeps the gap without a file as short as possible).
delete = urllib.request.Request(url, method="DELETE")
delete.add_header("Authorization", "token " + token)
delete.add_header("User-Agent", "tdlm-hmcl-publish")
try:
with urllib.request.urlopen(delete, timeout=300) as response:
response.read()
except urllib.error.HTTPError as exc:
if exc.code != 404:
raise SystemExit("HTTP %s deleting the old %s: %s" % (exc.code, name, exc.read()[:300]))
request = urllib.request.Request(url, data=data, method="PUT")
request.add_header("Authorization", "token " + token)
request.add_header("Content-Type", "application/octet-stream")
@@ -141,9 +141,9 @@ public final class Metadata {
return null;
}
/// Default client Server Modpack fileApi (CDN mirror of Pack's `tdlm-client/latest` layout).
/// Default client Server Modpack fileApi: the Nexus raw repository `tdlm-client` read through the CDN host.
public static final String DEFAULT_CLIENT_FILE_API =
"https://packages.dandanton.com/tdlm-client/latest";
"https://maven.dandanton.com/repository/tdlm-client";
/// Stable client update root (`server-manifest.json` and `overrides/` live under this URL).
///
@@ -398,12 +398,22 @@ public final class Controllers {
.whenComplete(Schedulers.javafx(), (result, exception) -> {
if (exception != null) {
LOG.warning("Failed to fetch client Server Modpack manifest", exception);
Controllers.dialog(
manifestUrl + "\n" + exception.getMessage(),
i18n("message.error"),
MessageType.ERROR);
Instances.importModpack();
return;
}
ServerModpackManifest manifest =
JsonUtils.fromMaybeMalformedJson(result, ServerModpackManifest.class);
if (manifest == null) {
LOG.warning("Malformed client Server Modpack manifest from " + manifestUrl);
Controllers.dialog(
i18n("modpack.type.server.malformed"),
i18n("message.error"),
MessageType.ERROR);
Instances.importModpack();
return;
}
Controllers.getDecorator().startWizard(