iris release commits

This commit is contained in:
Brian Neumann-Fopiano
2026-08-27 02:47:05 -04:00
parent f398c55091
commit 2b92fbf825
5 changed files with 26 additions and 26 deletions
@@ -325,7 +325,7 @@ public final class IrisModdedCommands {
return 0; return 0;
} }
String target = downloadDisplayTarget(request); String target = downloadDisplayTarget(request);
String downloadSource = request.pack() == null ? "direct ZIP URL" : "built-in beta release"; String downloadSource = request.pack() == null ? "direct ZIP URL" : "built-in stable release";
ModdedScheduler scheduler = ModdedEngineBootstrap.schedulerOrNull(); ModdedScheduler scheduler = ModdedEngineBootstrap.schedulerOrNull();
if (scheduler == null) { if (scheduler == null) {
fail(source, IrisLanguage.plain( fail(source, IrisLanguage.plain(
@@ -388,7 +388,7 @@ public final class DefaultPackBootstrapProvisioner {
try { try {
validCache = validateArchive(archivePath, spec); validCache = validateArchive(archivePath, spec);
} catch (IOException exception) { } catch (IOException exception) {
feedback.accept("Cached Iris " + spec.key() + " beta archive is invalid; downloading a replacement."); feedback.accept("Cached Iris " + spec.key() + " release archive is invalid; downloading a replacement.");
} }
} }
String cachedSource = metadata.getProperty("source", ""); String cachedSource = metadata.getProperty("source", "");
@@ -439,7 +439,7 @@ public final class DefaultPackBootstrapProvisioner {
copyLimited(input, output, options.maxArchiveBytes(), spec); copyLimited(input, output, options.maxArchiveBytes(), spec);
} }
if (!validateArchive(temporary, spec)) { if (!validateArchive(temporary, spec)) {
throw new IOException("Downloaded Iris " + spec.key() + " beta archive is invalid"); throw new IOException("Downloaded Iris " + spec.key() + " release archive is invalid");
} }
move(temporary, archivePath, true); move(temporary, archivePath, true);
} finally { } finally {
@@ -452,11 +452,11 @@ public final class DefaultPackBootstrapProvisioner {
updated.setProperty("fetchedAt", Long.toString(options.clock().millis())); updated.setProperty("fetchedAt", Long.toString(options.clock().millis()));
updated.setProperty("sha256", sha256(archivePath)); updated.setProperty("sha256", sha256(archivePath));
storePropertiesAtomic(metadataPath, updated); storePropertiesAtomic(metadataPath, updated);
feedback.accept("Downloaded the Iris " + spec.key() + " beta archive."); feedback.accept("Downloaded the Iris " + spec.key() + " release archive.");
return new Archive(archivePath, updated.getProperty("sha256")); return new Archive(archivePath, updated.getProperty("sha256"));
} }
close(response.body()); close(response.body());
IOException statusFailure = new IOException("Iris " + spec.key() + " beta download returned HTTP " + status); IOException statusFailure = new IOException("Iris " + spec.key() + " release download returned HTTP " + status);
if (!retryableStatus(status)) { if (!retryableStatus(status)) {
networkFailure = statusFailure; networkFailure = statusFailure;
break; break;
@@ -464,7 +464,7 @@ public final class DefaultPackBootstrapProvisioner {
networkFailure = statusFailure; networkFailure = statusFailure;
} catch (InterruptedException exception) { } catch (InterruptedException exception) {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
throw new IOException("Iris " + spec.key() + " beta download was interrupted", exception); throw new IOException("Iris " + spec.key() + " release download was interrupted", exception);
} catch (IOException exception) { } catch (IOException exception) {
networkFailure = exception; networkFailure = exception;
} }
@@ -474,7 +474,7 @@ public final class DefaultPackBootstrapProvisioner {
} }
if (cacheMatchesSource) { if (cacheMatchesSource) {
feedback.accept("Iris " + spec.key() + " beta download failed; using the validated cached archive."); feedback.accept("Iris " + spec.key() + " release download failed; using the validated cached archive.");
return new Archive(archivePath, sha256(archivePath)); return new Archive(archivePath, sha256(archivePath));
} }
if (isManagedPackOutputUsable(marker, cacheRoot.getParent().getParent(), spec)) { if (isManagedPackOutputUsable(marker, cacheRoot.getParent().getParent(), spec)) {
@@ -482,8 +482,8 @@ public final class DefaultPackBootstrapProvisioner {
return new Archive(null, sourceSha); return new Archive(null, sourceSha);
} }
throw networkFailure == null throw networkFailure == null
? new IOException("Iris " + spec.key() + " beta archive is unavailable and no valid cache exists") ? new IOException("Iris " + spec.key() + " release archive is unavailable and no valid cache exists")
: new IOException("Iris " + spec.key() + " beta archive is unavailable and no valid cache exists", networkFailure); : new IOException("Iris " + spec.key() + " release archive is unavailable and no valid cache exists", networkFailure);
} }
private static boolean isManagedPackOutputUsable(Properties marker, Path dataDirectory, PackSpec spec) { private static boolean isManagedPackOutputUsable(Properties marker, Path dataDirectory, PackSpec spec) {
@@ -514,11 +514,11 @@ public final class DefaultPackBootstrapProvisioner {
while ((entry = zip.getNextEntry()) != null) { while ((entry = zip.getNextEntry()) != null) {
entries++; entries++;
if (entries > MAX_ARCHIVE_ENTRIES) { if (entries > MAX_ARCHIVE_ENTRIES) {
throw new IOException("Iris " + spec.key() + " beta archive contains too many entries"); throw new IOException("Iris " + spec.key() + " release archive contains too many entries");
} }
String name = normalizedZipEntry(entry.getName()); String name = normalizedZipEntry(entry.getName());
if (!paths.add(name)) { if (!paths.add(name)) {
throw new IOException("Iris " + spec.key() + " beta archive contains duplicate path " + name); throw new IOException("Iris " + spec.key() + " release archive contains duplicate path " + name);
} }
String requiredDimension = "dimensions/" + spec.requiredDimension() + ".json"; String requiredDimension = "dimensions/" + spec.requiredDimension() + ".json";
if (name.equals(requiredDimension) || name.endsWith("/" + requiredDimension)) { if (name.equals(requiredDimension) || name.endsWith("/" + requiredDimension)) {
@@ -530,7 +530,7 @@ public final class DefaultPackBootstrapProvisioner {
while ((read = zip.read(buffer)) >= 0) { while ((read = zip.read(buffer)) >= 0) {
expanded += read; expanded += read;
if (expanded > MAX_EXPANDED_BYTES) { if (expanded > MAX_EXPANDED_BYTES) {
throw new IOException("Iris " + spec.key() + " beta archive expands beyond the safety limit"); throw new IOException("Iris " + spec.key() + " release archive expands beyond the safety limit");
} }
} }
} }
@@ -542,7 +542,7 @@ public final class DefaultPackBootstrapProvisioner {
private static Path extractArchive(Path archive, Path extractionRoot, PackSpec spec) throws IOException { private static Path extractArchive(Path archive, Path extractionRoot, PackSpec spec) throws IOException {
if (archive == null) { if (archive == null) {
throw new IOException("Cached Iris " + spec.key() + " beta archive is unavailable for required pack rebuild"); throw new IOException("Cached Iris " + spec.key() + " release archive is unavailable for required pack rebuild");
} }
long expanded = 0L; long expanded = 0L;
int entries = 0; int entries = 0;
@@ -551,12 +551,12 @@ public final class DefaultPackBootstrapProvisioner {
while ((entry = zip.getNextEntry()) != null) { while ((entry = zip.getNextEntry()) != null) {
entries++; entries++;
if (entries > MAX_ARCHIVE_ENTRIES) { if (entries > MAX_ARCHIVE_ENTRIES) {
throw new IOException("Iris " + spec.key() + " beta archive contains too many entries"); throw new IOException("Iris " + spec.key() + " release archive contains too many entries");
} }
String name = normalizedZipEntry(entry.getName()); String name = normalizedZipEntry(entry.getName());
Path output = extractionRoot.resolve(name).normalize(); Path output = extractionRoot.resolve(name).normalize();
if (!output.startsWith(extractionRoot)) { if (!output.startsWith(extractionRoot)) {
throw new IOException("Unsafe path in Iris " + spec.key() + " beta archive: " + entry.getName()); throw new IOException("Unsafe path in Iris " + spec.key() + " release archive: " + entry.getName());
} }
if (entry.isDirectory()) { if (entry.isDirectory()) {
Files.createDirectories(output); Files.createDirectories(output);
@@ -568,7 +568,7 @@ public final class DefaultPackBootstrapProvisioner {
while ((read = zip.read(buffer)) >= 0) { while ((read = zip.read(buffer)) >= 0) {
expanded += read; expanded += read;
if (expanded > MAX_EXPANDED_BYTES) { if (expanded > MAX_EXPANDED_BYTES) {
throw new IOException("Iris " + spec.key() + " beta archive expands beyond the safety limit"); throw new IOException("Iris " + spec.key() + " release archive expands beyond the safety limit");
} }
file.write(buffer, 0, read); file.write(buffer, 0, read);
} }
@@ -589,7 +589,7 @@ public final class DefaultPackBootstrapProvisioner {
} }
} }
if (candidates.size() != 1) { if (candidates.size() != 1) {
throw new IOException("Iris " + spec.key() + " beta archive has an invalid root layout"); throw new IOException("Iris " + spec.key() + " release archive has an invalid root layout");
} }
return candidates.getFirst(); return candidates.getFirst();
} }
@@ -613,7 +613,7 @@ public final class DefaultPackBootstrapProvisioner {
private static void validatePackRoot(Path path, PackSpec spec) throws IOException { private static void validatePackRoot(Path path, PackSpec spec) throws IOException {
if (!isPackRoot(path, spec)) { if (!isPackRoot(path, spec)) {
throw new IOException("Iris " + spec.key() + " beta pack is missing dimensions/" throw new IOException("Iris " + spec.key() + " release pack is missing dimensions/"
+ spec.requiredDimension() + ".json at " + path); + spec.requiredDimension() + ".json at " + path);
} }
} }
@@ -822,7 +822,7 @@ public final class DefaultPackBootstrapProvisioner {
while ((read = input.read(buffer)) >= 0) { while ((read = input.read(buffer)) >= 0) {
total += read; total += read;
if (total > limit) { if (total > limit) {
throw new IOException("Iris " + spec.key() + " beta archive exceeds the download size limit"); throw new IOException("Iris " + spec.key() + " release archive exceeds the download size limit");
} }
output.write(buffer, 0, read); output.write(buffer, 0, read);
} }
@@ -63,10 +63,10 @@ import java.util.zip.ZipInputStream;
public final class PackDownloader { public final class PackDownloader {
private static final String DEFAULT_OVERWORLD_PACK = "overworld"; private static final String DEFAULT_OVERWORLD_PACK = "overworld";
private static final String DEFAULT_OVERWORLD_URL = private static final String DEFAULT_OVERWORLD_URL =
"https://github.com/IrisDimensions/overworld/releases/download/beta/overworld.zip"; "https://github.com/IrisDimensions/overworld/releases/download/4002/overworld.zip";
private static final String UNDERWORLD_PACK = "underworld"; private static final String UNDERWORLD_PACK = "underworld";
private static final String UNDERWORLD_URL = private static final String UNDERWORLD_URL =
"https://github.com/IrisDimensions/underworld/releases/download/beta/underworld.zip"; "https://github.com/IrisDimensions/underworld/releases/download/1005/underworld.zip";
private static final List<String> BUILT_IN_PACK_KEYS = List.of(DEFAULT_OVERWORLD_PACK, UNDERWORLD_PACK); private static final List<String> BUILT_IN_PACK_KEYS = List.of(DEFAULT_OVERWORLD_PACK, UNDERWORLD_PACK);
private static final Map<String, String> BUILT_IN_PACK_URLS = Map.of( private static final Map<String, String> BUILT_IN_PACK_URLS = Map.of(
DEFAULT_OVERWORLD_PACK, DEFAULT_OVERWORLD_URL, DEFAULT_OVERWORLD_PACK, DEFAULT_OVERWORLD_URL,
@@ -458,7 +458,7 @@ public class DefaultPackBootstrapProvisionerTest {
} }
@Test @Test
public void betaPacksUpdateIndependentlyAndRecompileOneAggregateDatapack() throws Exception { public void releasePacksUpdateIndependentlyAndRecompileOneAggregateDatapack() throws Exception {
byte[] overworld = packArchive("overworld", "overworld_first"); byte[] overworld = packArchive("overworld", "overworld_first");
byte[] underworldFirst = underworldArchive("underworld_first"); byte[] underworldFirst = underworldArchive("underworld_first");
AtomicInteger requests = new AtomicInteger(); AtomicInteger requests = new AtomicInteger();
@@ -105,9 +105,9 @@ public class PackDownloaderTest {
} }
@Test @Test
public void resolvesDefaultOverworldBetaRelease() { public void resolvesDefaultOverworldStableRelease() {
assertEquals( assertEquals(
"https://github.com/IrisDimensions/overworld/releases/download/beta/overworld.zip", "https://github.com/IrisDimensions/overworld/releases/download/4002/overworld.zip",
PackDownloader.builtInPackUrl("overworld") PackDownloader.builtInPackUrl("overworld")
); );
assertTrue(PackDownloader.isDefaultOverworld("overworld")); assertTrue(PackDownloader.isDefaultOverworld("overworld"));
@@ -116,9 +116,9 @@ public class PackDownloaderTest {
} }
@Test @Test
public void resolvesUnderworldBetaRelease() { public void resolvesUnderworldStableRelease() {
assertEquals( assertEquals(
"https://github.com/IrisDimensions/underworld/releases/download/beta/underworld.zip", "https://github.com/IrisDimensions/underworld/releases/download/1005/underworld.zip",
PackDownloader.builtInPackUrl("underworld") PackDownloader.builtInPackUrl("underworld")
); );
assertTrue(PackDownloader.isBuiltInPack("underworld")); assertTrue(PackDownloader.isBuiltInPack("underworld"));