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

Request: make stagefile configurable #27

Closed
dsielert opened this issue May 9, 2019 · 1 comment
Closed

Request: make stagefile configurable #27

dsielert opened this issue May 9, 2019 · 1 comment

Comments

@dsielert
Copy link

dsielert commented May 9, 2019

remco doesn't seem to like my .env configuration files as the stagefilename is the dest prepended with a '.'
Workaround for now I found that works is to use

 reload_cmd  = "cp /var/www/env /var/www/.env 
@HeavyHorst
Copy link
Owner

The stageFileName is always ioutil.TempFile(filepath.Dir(s.Dst), "."+filepath.Base(s.Dst)) at the moment.

So if your destination file ist /var/www/env then your stageFile would be /var/www/.env.7643745 (something random).

You can then use this stageFile in your check_cmd like this:
check_cmd(string, optional):
The command to check config. Use {{.src}} to reference the rendered source template.

{{.src}} is the stageFile.

You can't use it that way? Do you have an example where you need a different behavior?

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

No branches or pull requests

2 participants