-
Notifications
You must be signed in to change notification settings - Fork 1.3k
APWorld Builder: Add .apignore format to not include files in build
#5779
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
base: main
Are you sure you want to change the base?
Conversation
Details could change here slightly, but probably good to get an outline.
FlitPix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested, works well! /.git/ doesn't seem to work, but i'm aware my repo is set up in a way that isn't recommended so still approving :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add .gitignore and .git here too? there's little to no reason for it to be in a built apworld, at least not that i can think of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They could make sense yeah, I had excluded those locally before with an edit to the component since I used a submodule. Although I'm a bit confused on the "/.git/ doesn't seem to work". Maybe you have a .git file instead (which seems to be the case for submodules), in which case it should be /.git instead since the trailing slash makes it only apply to directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh you're right, ignore that part then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree that /.git and /.github/ should absolutely be in the default ignore
ArchipelagoMW/Archipelago#5779 adds a .apignore format to exclude certain files from being included in built APWorlds. This commit adds a .apignore file to exclude git-related files from release artifacts. __pycache__ is already excluded globally, so no need to include it.
silasary
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather lean on pathspec as a tried and tested library, rather than rolling out own hard to maintain regex monstrosity.
But this does work.
benny-dreamly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this
|
I'm gonna mark this as draft for the moment since using a library seems to also be what was wanted by core from the discord, so it'd be good for people to test once that's implemented. |
|
Changed over to pathspec now. It seemed to work the same way from my testing, but others trying as well would be good. |
silasary
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the new version, it all works perfectly
FlitPix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-approving new changes
What is this fixing or adding?
Gives more flexibility to the Build APWorlds tool by allowing a
.gitignore-semantics.apignorefile to be included in the world, which the build will not add to the.apworldarchive. Hopefully this will allow more people to move to using this for their build process since some people have cited the lack of this functionality as a blocker before. Also replaces the current exclusions with aGLOBAL.apignorefile in data that could be easily edited in the future.How was this tested?
Running the build component with a single world and checking output, both from the global ignores and also adding an ignore to its world folder. Running the build on all worlds, which seems to have taken around the same time as before.
If this makes graphical changes, please attach screenshots.
🚫👀