Environment

Summary

Contains functionality related to the environment.

Argument

ArgumentOrEnvironmentVariable(ICakeContext, string, bool)
Alias from Cake.ArgumentHelpers addin
Get a bool variable from various script inputs: first via Argument, then falling back on EnvironmentVariable, finally falling back on a default.
ArgumentOrEnvironmentVariable(ICakeContext, string, string)
Alias from Cake.ArgumentHelpers addin
Get a string variable from various script inputs: first via Argument, then falling back on EnvironmentVariable, finally falling back on a default.
ArgumentOrEnvironmentVariable(ICakeContext, string, string, bool)
Alias from Cake.ArgumentHelpers addin
Get a bool variable from various script inputs: first via Argument, then falling back on EnvironmentVariable, finally falling back on a default.
ArgumentOrEnvironmentVariable(ICakeContext, string, string, string)
Alias from Cake.ArgumentHelpers addin
Get a string variable from various script inputs: first via Argument, then falling back on EnvironmentVariable, finally falling back on a default.

Environment Variables

EnvironmentVariable(ICakeContext, string) Retrieves the value of the environment variable or null if the environment variable does not exist.
EnvironmentVariable<T>(ICakeContext, string, T) Retrieves the value of the environment variable or defaultValue if the environment variable does not exist.
EnvironmentVariables(ICakeContext) Retrieves all environment variables.
HasEnvironmentVariable(ICakeContext, string) Checks for the existence of a value for a given environment variable.

Platform

IsRunningOnLinux(ICakeContext) Determines whether the build script running on a Linux based system.
IsRunningOnMacOs(ICakeContext) Determines whether the build script running on a macOS based system.
IsRunningOnUnix(ICakeContext) Determines whether the build script running on a Unix or Linux based system.
IsRunningOnWindows(ICakeContext) Determines whether the build script is running on Windows.