From f97489cc9e5151e99b9b2b25401fa99e36cf0902 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 26 May 2021 19:24:03 +0100 Subject: [PATCH] Missing methods --- build.cake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.cake b/build.cake index 5b1b1e9..9d38bfc 100644 --- a/build.cake +++ b/build.cake @@ -59,3 +59,11 @@ Task("Default").IsDependentOn("dotnet-pack"); ////////////////////////////////////////////////////////////////////// RunTarget(target); + +T GetBuildVariable(string key, T defaultValue) +{ + // on MAC all environment variables are upper case regardless of how you specify them in devops + // And then Environment Variable check is case sensitive + T upperCaseReturnValue = Argument(key.ToUpper(), EnvironmentVariable(key.ToUpper(), defaultValue)); + return Argument(key, EnvironmentVariable(key, upperCaseReturnValue)); +}