-
-
Notifications
You must be signed in to change notification settings - Fork 732
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
Add configuration file for Cake. #833
Comments
@patriksvensson would there be a way for me to explicitly choose one of the configuration mechanisms? I can see myself attempting to send in configuration from a file unaware that someone has setup environment variables. Maybe on the |
@RLittlesII Different ways of getting configuration values will have different precedence.
So an environment variable can be overridden by a configuration file which in turn can be overridden by an argument. |
Nice. FWIW, sounds a lot like aspnet/Configuration. |
Thanks, we are aware of the potential cross over. However, since that package is still pre-release, and also due to the fact that we don't want to pull in another dependency for Cake at this time, we decided to roll our own for now. |
Shouldn't the config-file also be respected by the |
No, the bootstrapper script are optional and more of a convenience thing. Each person will need to update their bootstrappers to fit their need. |
any plans on migrating to |
@Meir017 no, but you could probably reference it as an addin if you want to utilize it in your build scripts. |
@Meir017 just to add a little more to this...
Cake has deliberately not taken dependencies on 3rd Party Libraries. This has aided us to continue to work seamlessly across all the target operating system and environments. Granted, libraries such as the one you mention are starting to work everywhere, but in all likelihood Cake will continue with the same premise, i.e. only take a dependency when there is literally no other way to achieve the desired outcome. |
How do i use the CakeConfigration in build.cake file? |
I actually did exactly this manually. I have a JSON file with the defaults, then arguments override that and env vars override that. Would be nice to have it OOB |
Is this already built-in? |
Sometimes we want to be able to configure internals of Cake so I propose that we add support for this. My proposal is that we add
ICakeConfiguration
that will fetch values in the following order:Environment variables:
Environment variables are named like the following convention:
The
CAKE_
part will be completely removed from the key name.Example
Configuration file:
Arguments:
Arguments are passed in the following format:
Example:
Using the configuration
The text was updated successfully, but these errors were encountered: