feat(base): adopt Purpur distribution naming
BREAKING CHANGE: New release assets use purpur-base-<version>.jar. Runtime SpigotBase identity, data folders, permissions and persistent item keys remain unchanged. Replace the old JAR rather than loading both distributions.
This commit is contained in:
@@ -35,6 +35,6 @@ jobs:
|
|||||||
- name: Upload development artifact
|
- name: Upload development artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: spigot-base-${{ github.sha }}
|
name: purpur-base-${{ github.sha }}
|
||||||
path: build/libs/*.jar
|
path: build/libs/*.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ jobs:
|
|||||||
if: steps.release.outputs.created == 'true'
|
if: steps.release.outputs.created == 'true'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: spigot-base-${{ steps.release.outputs.version }}
|
name: purpur-base-${{ steps.release.outputs.version }}
|
||||||
path: build/libs/spigot-base-${{ steps.release.outputs.version }}.jar
|
path: build/libs/purpur-base-${{ steps.release.outputs.version }}.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Create Gitea release and upload plugin
|
- name: Create Gitea release and upload plugin
|
||||||
@@ -101,7 +101,7 @@ jobs:
|
|||||||
PREVIOUS_TAG: ${{ steps.previous_tag.outputs.value }}
|
PREVIOUS_TAG: ${{ steps.previous_tag.outputs.value }}
|
||||||
run: |
|
run: |
|
||||||
api_url="${GITEA_SERVER_URL}/api/v1"
|
api_url="${GITEA_SERVER_URL}/api/v1"
|
||||||
jar="build/libs/spigot-base-${VERSION}.jar"
|
jar="build/libs/purpur-base-${VERSION}.jar"
|
||||||
export RELEASE_BODY
|
export RELEASE_BODY
|
||||||
if [ -n "$PREVIOUS_TAG" ]; then
|
if [ -n "$PREVIOUS_TAG" ]; then
|
||||||
RELEASE_BODY=$(git log --pretty='format:- %s (%h)' "${PREVIOUS_TAG}..HEAD")
|
RELEASE_BODY=$(git log --pretty='format:- %s (%h)' "${PREVIOUS_TAG}..HEAD")
|
||||||
@@ -138,4 +138,4 @@ jobs:
|
|||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary "@${jar}" \
|
--data-binary "@${jar}" \
|
||||||
"${api_url}/repos/${REPOSITORY}/releases/${release_id}/assets?name=spigot-base-${VERSION}.jar"
|
"${api_url}/repos/${REPOSITORY}/releases/${release_id}/assets?name=purpur-base-${VERSION}.jar"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# spigot-base agent entrypoint
|
# purpur-base agent entrypoint
|
||||||
|
|
||||||
The canonical stories, engineering guidance, and **all process documents** are in the private [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/index.md).
|
The canonical stories, engineering guidance, and **all process documents** are in the private [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/index.md).
|
||||||
|
|
||||||
Before work, read the sibling `../somc-okf/index.md`, `../somc-okf/processes/index.md`, `../somc-okf/projects/spigot-base/index.md`, `engineering.md` in that project section, and relevant `../somc-okf/user-stories/spigot-base/` stories. Also follow the parent workspace `AGENTS.md` when present.
|
Before work, read the sibling `../somc-okf/index.md`, `../somc-okf/processes/index.md`, `../somc-okf/projects/purpur-base/index.md`, `engineering.md` in that project section, and relevant `../somc-okf/user-stories/purpur-base/` stories. Also follow the parent workspace `AGENTS.md` when present.
|
||||||
|
|
||||||
For standalone checkouts, start at the [project page](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/spigot-base/index.md) and [shared process](https://git.garvis.dev/dmg/somc-okf/src/branch/main/processes/development.md). Obtain wiki access before feature work; do not recreate a local knowledge bundle. Source builds do not require private wiki access.
|
For standalone checkouts, start at the [project page](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/purpur-base/index.md) and [shared process](https://git.garvis.dev/dmg/somc-okf/src/branch/main/processes/development.md). Obtain wiki access before feature work; do not recreate a local knowledge bundle. Source builds do not require private wiki access.
|
||||||
|
|
||||||
Development follows [Development cycle](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/development-cycle.md): approved stories, failing tests, passing implementation, verification, then source/wiki commit and push. GitOps updates are committed locally **without pushing**; only [Do release](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/do-release.md) authorizes a reviewed GitOps push.
|
Development follows [Development cycle](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/development-cycle.md): approved stories, failing tests, passing implementation, verification, then source/wiki commit and push. GitOps updates are committed locally **without pushing**; only [Do release](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/do-release.md) authorizes a reviewed GitOps push.
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
# Spigot Base
|
# Purpur Base
|
||||||
|
|
||||||
A Purpur 26.2 plugin providing progression-gated player bases and quality-of-life unlocks.
|
A Purpur 26.2 plugin providing progression-gated player bases and quality-of-life unlocks.
|
||||||
|
|
||||||
Players begin by breaking Survival-mode grass blocks or dirt. The progression paths provide a persistent base, navigation particles, expanding base bounds, controlled flight, personal teleportation, and visitor teleportation.
|
Players begin by breaking Survival-mode grass blocks or dirt. The progression paths provide a persistent base, navigation particles, expanding base bounds, controlled flight, personal teleportation, and visitor teleportation.
|
||||||
|
|
||||||
The approved behavior is specified in the [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/spigot-base/index.md).
|
The approved behavior is specified in the [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/purpur-base/index.md).
|
||||||
|
|
||||||
|
The repository and new artifacts are named `purpur-base`. Runtime identity remains `SpigotBase`: existing `plugins/SpigotBase/` data, commands, `spigotbase.*` permissions, item keys and Java entrypoints remain compatible. Replace the old JAR when installing a new release; never load both distributions together. Historical `spigot-base-*` release assets are retained.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ dependencies {
|
|||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
|
dependsOn(tasks.jar)
|
||||||
|
systemProperty("distribution.jar", tasks.jar.get().archiveFile.get().asFile.absolutePath)
|
||||||
|
systemProperty("distribution.version", project.version.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify client-only label packets against the declared runtime, without starting a server.
|
// Verify client-only label packets against the declared runtime, without starting a server.
|
||||||
|
|||||||
+1
-1
@@ -2,4 +2,4 @@ plugins {
|
|||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "spigot-base"
|
rootProject.name = "purpur-base"
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package games.dmg.spigotbase;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
import java.io.DataInputStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.jar.JarFile;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.yaml.snakeyaml.Yaml;
|
||||||
|
|
||||||
|
/** Distribution branding is deliberately independent of persistent/runtime plugin identity. */
|
||||||
|
class PurpurDistributionTest {
|
||||||
|
@Test
|
||||||
|
void packagesJava25UnderNewNameWithoutChangingRuntimeIdentityOrBundlingTheApi() throws Exception {
|
||||||
|
Path artifact = Path.of(System.getProperty("distribution.jar"));
|
||||||
|
String version = System.getProperty("distribution.version");
|
||||||
|
assertEquals("purpur-base-" + version + ".jar", artifact.getFileName().toString());
|
||||||
|
try (var jar = new JarFile(artifact.toFile())) {
|
||||||
|
Map<?, ?> metadata = new Yaml().load(jar.getInputStream(jar.getJarEntry("plugin.yml")));
|
||||||
|
assertEquals(version, metadata.get("version"));
|
||||||
|
assertEquals("SpigotBase", metadata.get("name"), "Do not orphan the existing plugin data folder or default namespace");
|
||||||
|
assertEquals("games.dmg.spigotbase.SpigotBasePlugin", metadata.get("main"));
|
||||||
|
assertTrue(((Map<?, ?>) metadata.get("permissions")).containsKey("spigotbase.admin"));
|
||||||
|
try (var bytecode = new DataInputStream(jar.getInputStream(
|
||||||
|
jar.getJarEntry("games/dmg/spigotbase/SpigotBasePlugin.class")))) {
|
||||||
|
assertEquals(0xCAFEBABE, bytecode.readInt());
|
||||||
|
bytecode.readUnsignedShort();
|
||||||
|
assertEquals(69, bytecode.readUnsignedShort(), "Plugin bytecode must target Java 25");
|
||||||
|
}
|
||||||
|
assertFalse(jar.stream().anyMatch(entry -> entry.getName().startsWith("org/bukkit/")
|
||||||
|
|| entry.getName().startsWith("org/purpurmc/") || entry.getName().endsWith("Test.class")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void releaseAndCiAgreeWithThePurpurDistributionNameAndToolchain() throws Exception {
|
||||||
|
String build = Files.readString(Path.of("build.gradle.kts"));
|
||||||
|
assertTrue(build.contains("purpur-api:26.2.build.2618-stable"));
|
||||||
|
assertFalse(build.contains("org.spigotmc:spigot-api"));
|
||||||
|
for (String workflow : new String[] {"ci.yml", "release.yml"}) {
|
||||||
|
String content = Files.readString(Path.of(".gitea/workflows", workflow));
|
||||||
|
assertTrue(content.contains("java-version: 25"));
|
||||||
|
assertTrue(content.contains("purpur-base-"), workflow + " must publish the renamed distribution");
|
||||||
|
assertFalse(content.contains("spigot-base-"), workflow + " must not look for the old JAR filename");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user