Open ChristianKniep opened 7 months ago
Hey @ChristianKniep ! Nice to meet you!
projects:
completeDirectory:
- destination: "config/"
source: "templates/config_directory/"
++ permissions: 0644
values:
appName: "MyApp"
repositories:
- name: "directory-project"
groups:
- groupName: "completeDirectory"
do not overwrite: I see the importance of this feature, especially for safeguarding user-customized files like ENV configurations. A simple implementation could be adding an overwrite: false
flag to protect existing files from being overwritten as you said. When building the v1
version here I wanted to actually add the file sha
to the lockfile so one could also make manual changes visible when using the diff
command. But I skipped that because the problem here is one would have to render all the files first in memory and then calculate the sha in order to compare it against the file present in the target directory..
default values: This is a great suggestion. Automatically pulling in the project name into templates would streamline the process I agree. I'm doing some sort of workaround for my private projects at the moment by writing the project name into a value name
and use this one in the files instead of having a pre populated one.
value flags: I'm on board with this idea. It would significantly enhance the CLI's flexibility, allowing users to pass additional parameters directly just like in Helm Charts et al. .
Let's see if I can find some spare time to make some of your ideas happen. Thanks!
This issue is idle because it has been open for 14 days with no activity.
Love the project! I'm trying to get a golang-cli template up and running. Couple of things I feel are missing atm:
0644
. Would be nice to take the sources permissions and apply it to the destinationoverwrite: false
would be nice.{{ . project.name }}
as a default variable since it is an argument to the CLI.--value key=value --value key2=val2
so that I do not have to tweak the YAML file but rather have it be added to the CLI command.