Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make asset extraction a local action #366

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kralverde
Copy link
Contributor

@kralverde kralverde commented Dec 3, 2024

Description

With changes with minecraft versions, asset files can have massive changes causing a lot of bloat on the git repo that can lead to MBs of extra un-needed data.

This PR introduces a script to generate and move asset files from the extractor to their locations in the project root as well as a workflow artifact for users to download rather than extract if they prefer

Checklist

Things need to be done before this Pull Request can be merged.

  • Update workflows to add a compressed archive of extracted files for those who don't want to extract them locally themselves
  • Update workflows to extract assets before building
  • Add windows scripts
  • Add bash scripts
  • Code is well-formatted and adheres to project style guidelines: cargo fmt
  • Code does not produce any clippy warnings: cargo clippy
  • All unit tests pass: cargo test

@kralverde kralverde changed the title Make asset extraction an local action Make asset extraction a local action Dec 3, 2024
@kralverde kralverde marked this pull request as ready for review December 4, 2024 00:50
@DataM0del
Copy link
Contributor

DataM0del commented Dec 9, 2024

If you want to save space without setting the depth to 1, you'll probably need to use a tool to remove the assets directory entirely from the git history and push that.

@kralverde
Copy link
Contributor Author

I think this is more a forward looking solution. Re-writing got history is a pain with minimal benefits rn imo

@OfficialKris
Copy link
Contributor

OfficialKris commented Dec 9, 2024

Also, it is no longer just the assets folder. There are extracted JSON object files under pumpkin-world/assets/. The world assets folder is currently 50MiB and that is with just one revision. Any changes would bump that up significantly since the files are one line, minus any git optimizations.

The .git folder on my machine is currently 30MiB which includes many other branches and their revisions. So I don't think current history is too much of a problem.

@OfficialKris
Copy link
Contributor

Is there a reason to use os dependent scripts rather than running a rust program?

@kralverde
Copy link
Contributor Author

Is there a reason to use os dependent scripts rather than running a rust program?

I suppose not... but I think it's a bit overkill for what boils down to running commands in a sequence

@kralverde kralverde marked this pull request as draft December 9, 2024 15:39
@kralverde kralverde mentioned this pull request Dec 10, 2024
3 tasks
@kralverde kralverde marked this pull request as ready for review December 10, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants