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

Feature Request: Exclude from processing but still copy file to target folder #1911

Closed
assayire opened this issue Nov 13, 2023 · 0 comments · Fixed by #1963
Closed

Feature Request: Exclude from processing but still copy file to target folder #1911

assayire opened this issue Nov 13, 2023 · 0 comments · Fixed by #1963
Milestone

Comments

@assayire
Copy link
Contributor

gomplate processes entire directory of files and sub-directories, and copies/creates/materializes each one in a desired target folder. The problem is when gomplate tries to process files like .jar or images and fails because of unexpected delimiter like characters in those files. This is totally not predictable because we cannot say what those binary files contain and if they happen to overlap with gomplate or any other templating engine syntax.

It would be great if gomplate could support exclude such files from processing for templating but still copy them to the target folder. This is a classic case when the folder you are processing is a project template (like Java or other).

Exclusion may fall into one of the following categories

  • None (default)
  • FromProcessing (but shall be copied to the target folder)
  • FromCopying (+Processing, the —exclude option)

An option like —exclude-processing that complements the existing —exclude would be great.

Manually copying using the postexec is possible but fragile because it is hard to guarantee that all the files not processed are picked up without skipping any file or folder and copied in the postexec step.

Ref: See Discussion for details

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

Successfully merging a pull request may close this issue.

2 participants