You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trane9991 Thanks for logging this, it's an interesting question!
I feel like there's a bit of an overlap here with some of the ideas discussed in #589 (at least in spirit, if not explicitly).
It should be possible to accomplish this with --output-map, and if you can manage to have valid template inputs as filenames (like {{.Env.project}} should work, in theory), then this should work:
Keep in mind that these file names are going to be a bit sketchy to keep as valid templates, but on most modern UNIX-like filesystems (i.e. on macOS/Linux at least) this sort of thing will work:
I was looking in the documentation, but couldn't find if it is possible to use variables as part of filename.
For example I have a project like:
$ tree . ├── go.mod └── {{env.project}} ├── data │ └── {{env.project}}.txt └── {{env.project}}.go
And after running
project=serviceA gomplate --input-dir $(pwd) --output-dir /tmp/$project
I want to getThen create similarly project
serviceB
,serviceC
, etc.Is it possible? If not, how do you think does it make sense to implement? How hard would that be?
Thanks for the tool, it is really nice, I like the simplicity of it.
The text was updated successfully, but these errors were encountered: