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

Exclude option support #218

Closed
zealic opened this issue Oct 26, 2017 · 8 comments
Closed

Exclude option support #218

zealic opened this issue Oct 26, 2017 · 8 comments

Comments

@zealic
Copy link
Contributor

zealic commented Oct 26, 2017

Need "--exclude" option to ignore some files:

Example:

gomplate --input-dir=./data \
  --exclude=".*"     \ # Exclude file or directory with dot prefix
  --exclude="*.xml"  \ # Recursive exclude xml file
  --exclude="logs"   \ # Exclude logs file or directory
  --output-dir=./output

Refernece:

@hairyhenderson
Copy link
Owner

@zealic thanks for logging this! Sounds like a reasonable feature when processing a directory with many files.

@zealic
Copy link
Contributor Author

zealic commented Oct 27, 2017

I will implement this feature.
Maybe '.gomplateignore' is better idea.

@hairyhenderson
Copy link
Owner

@zealic yeah - .gomplateignore would be great - I'm assuming you're meaning something similar to the .gitignore file?

@zealic
Copy link
Contributor Author

zealic commented Oct 27, 2017

@hairyhenderson Yes, it is.

Default use '--input-dir' root .gomplateignore file, sub folder can be inherit.
Finally, '--exclude' option add additional ignore files.

@hairyhenderson
Copy link
Owner

@zealic That sounds good. I'd like the .gomplateignore and --exclude features to be submitted as separate PRs, for clarity

@keydrevolta
Copy link

@zealic this may help you tsuru/tsuru-client#25

@Gman98ish
Copy link
Contributor

Gman98ish commented Oct 30, 2017

Hi, all 👋
I've not done the whole thing, just found a potential solution for the command line flag, potentially provides a starting point for the .gomplateignore

@hairyhenderson
Copy link
Owner

--exclude is now available, so I'm going to close this issue. Feel free to enhance with further PRs though! 🙂

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

No branches or pull requests

4 participants