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

Allow usage of environment variables in post: #520

Closed
adlotsof opened this issue Aug 16, 2023 · 4 comments · Fixed by #521
Closed

Allow usage of environment variables in post: #520

adlotsof opened this issue Aug 16, 2023 · 4 comments · Fixed by #521
Labels
enhancement New feature or request

Comments

@adlotsof
Copy link
Contributor

When running changie new with post: -key author -value {{ .Env.AUTHOR }} fill value with the environment variable contents (e.g. PREFIX_AUTHOR)

@adlotsof adlotsof added the enhancement New feature or request label Aug 16, 2023
@miniscruff
Copy link
Owner

Good catch, this must of slipped through.

@miniscruff
Copy link
Owner

Hmm actually, I just remembered something, on the docs page I point out that env vars are not loaded when using new here https://changie.dev/config/#change-env and the reason, if I remember correctly, is these values are not loaded from the yaml when running batch? I have to look that up.

@miniscruff
Copy link
Owner

Ok sorry for the spam here but I think I got it...
So that warning was stating that defining env vars when running new did nothing. Which is still true, but by loading the env vars you can use them in post which adds custom values which are read from batching. All good, reviewing first thing in the morning really through me off.

@miniscruff
Copy link
Owner

Thanks for the pull request, I will get this out as soon as I finish the project pr in the next day or two hopefully.

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

Successfully merging a pull request may close this issue.

2 participants