workflows: fix quoting

This commit is contained in:
extremeheat
2025-09-06 22:55:44 +00:00
parent 02dd119581
commit 44b33c7dd1
2 changed files with 8 additions and 9 deletions
+6 -7
View File
@@ -1,5 +1,5 @@
minecraft-data-generator extracts and generates Minecraft server-side data for multiple Minecraft versions via a Fabric mod that hooks into the vanilla Minecraft server.
This data that is generated is then stored inside the https://github.com/PrismarineJS/minecraft-data repo, a cross language repo holding minecraft data on blocks, items and more.
This generated data is then stored inside the https://github.com/PrismarineJS/minecraft-data repo, a cross language repo holding minecraft data on blocks, items and more.
There is a different mod for each Minecraft version this repo supports, under the `mc/<version>` folder.
Each version has a Gradle project at `:mc:<version>` and generating the data is done by running the Gradle task:
@@ -12,7 +12,7 @@ Generated data ends up under `mc/<version>/run/server/minecraft-data` in the rep
- mc/ — per-Minecraft-version directories of OUR extractor code (e.g. `mc/1.21.8`)
- versions.json — canonical JSON array of versions that are supported (i.e. there are folders in mc/ for it)
- mc-source/<version> — (External) minecraft java edition code for relevant version with Mojang mappings that you can reference for changes.
* we store the last 2 most recent versions in the folder to save space, but if you need more versions you can do `git fetch origin client1.21.3 && git switch client1.21.3`
* we store the last 2 most recent versions in the folder to save space, but if you need more versions you can do `cd mc-source/1.21.3 && git fetch origin client1.21.3 && git switch client1.21.3` (as these folders are a repo cloned with specific branches)
* there is a .diff file in mc-source/ like `1.21.7_to_1.21.8.diff` that contains result of `git diff --no-index old new` that you can reference for changes (note it's typically large)
* Since our generator is using Mojang mappings, the API naming is the same.
- README.md — info how to set up
@@ -26,7 +26,7 @@ As explained in the README.md, there is an auto update workflow that typically c
These PRs are simply copying old version code into new, so there may be changes and other code fixes needed to support the new version. It's your
job to help plug the gaps by making these changes until the build passes for the given version.
It's also possible that there maybe missing or broken generated data even if the build is passing: in these cases, listen to the user's request
and figure out how to replicate, debug and fix the issues in data generation that may be a logical issue over a syntax one.
and figure out how to replicate, debug and fix the logical issues in data generation.
## Troubleshooting
@@ -36,17 +36,16 @@ generator code.
Sometimes, some APIs might change inside the mc code and make the data that the current code extracts no longer
valid. In these cases, do your best to conform the new data to the old structure even if it feels wrong. If you
can't, for example, let's say something about effects are removed from the game. But our data gen still expects it.
can't, for example, let's say something about effects are removed from the game--but our data gen still expects it.
What to do? You should set the data to null, and inform the user about the issue -- perhaps a schema change is needed.
You can propose a new schema to the user (so that the relevant changes can be made to minecraft-data) and if
user confirms, you'd update the generator to output in that new schema.
You can propose a new schema to the user (so that the relevant changes can be made to minecraft-data) and if the user confirms, you'd update the generator to output in that new schema.
### Steps
- Reproduce the problem locally inside the container and run the generator task.
- Example run command: `./gradlew :mc:1.21.6:runServer --stacktrace`
- See if the problem exists on an older version -- if so inform the user, otherwise compare logs and code
- Inspect diffs in `mc-source/` to correlate Mojang API changes.
- See [mc-source/](mc-source/)
- See mc-source/
- Validate generated output at `mc/<version>/run/server/minecraft-data` to make sure all files are there
---
+2 -2
View File
@@ -67,8 +67,8 @@ async function main () {
try {
fs.appendFileSync(ghOut, `success_versions=${JSON.stringify(successes)}\n`)
fs.appendFileSync(ghOut, `failed_versions=${JSON.stringify(failures)}\n`)
fs.appendFileSync(ghOut, `latest_version=${JSON.stringify(latestVersion)}\n`)
fs.appendFileSync(ghOut, `second_latest_version=${JSON.stringify(secondLatestVersion)}\n`)
fs.appendFileSync(ghOut, `latest_version=${latestVersion}\n`)
fs.appendFileSync(ghOut, `second_latest_version=${secondLatestVersion}\n`)
} catch (e) {
console.warn('Could not write to GITHUB_OUTPUT:', e && e.message)
}