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

feature request: Support exclude(ignore) using .riceignore #83

Open
at15 opened this Issue Aug 21, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@at15
Copy link

at15 commented Aug 21, 2016

Similar issues: #80 #37

go.rice does not support excluding files and this result in huge binary if you have folders like node_modules, and due to the way rice find boxes (related #47 ), it's hard to specify different box location for same box during development and production. So similar to git and docker, which has .gitignore and .dockeringore, a .riceignore file can be introduced to make rice more flexible without
changing how rice find boxes.

The implementation in docker for dockerignore can be a good start, also there is a dockerignore library

I have already tried it in my own fork in this commit. It works for append zip only, and use the library mentioned above, it works for this small project. Though the behavior is not exactly same as gitingore and only .riceignore file at box root is supported.

I can make a pull request if go.rice is still under development. Thanks~

@at15 at15 referenced this issue Aug 21, 2016

Open

Support ignore files #1

0 of 2 tasks complete
@producerism

This comment has been minimized.

Copy link

producerism commented Jun 12, 2017

This would be a great feature, currently having to manually edit my rice-box.go to remove DS_STORE files and others

@nadilas

This comment has been minimized.

Copy link

nadilas commented Feb 24, 2018

Has this been implemented?

@GeertJohan

This comment has been minimized.

Copy link
Owner

GeertJohan commented Dec 29, 2018

@at15 If you're still interested in making a PR for this, it would be very welcome.
I think to keep things simple a .riceignore file should only be valid in the root of a box, and is only valid for that box.
Absolute paths in the .riceignore file are relative to the root of the box.

Perhaps we should try to follow the gitignore guidelines for pattern matching.
https://git-scm.com/docs/gitignore
Go has it's own filepath pattern matching as well, but that doesn't seem to support ** for subdirectories?
https://golang.org/pkg/path/filepath/#Match

This was referenced Dec 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment