1- #load "helpers.cake"
21using System . Text . Json . Serialization ;
32
43/*****************************
@@ -22,15 +21,15 @@ DirectoryPath OutputPath
2221 public DirectoryPath BinaryOutputPath { get ; } = OutputPath . Combine ( "bin" ) ;
2322 public DirectoryPath IntegrationTestPath { get ; } = OutputPath . Combine ( IntegrationTest ) ;
2423
25- public string GitHubNuGetSource { get ; } = System . Environment . GetEnvironmentVariable ( "GH_PACKAGES_NUGET_SOURCE" ) ;
26- public string GitHubNuGetApiKey { get ; } = System . Environment . GetEnvironmentVariable ( "GITHUB_TOKEN" ) ;
24+ public string ? GitHubNuGetSource { get ; } = System . Environment . GetEnvironmentVariable ( "GH_PACKAGES_NUGET_SOURCE" ) ;
25+ public string ? GitHubNuGetApiKey { get ; } = System . Environment . GetEnvironmentVariable ( "GITHUB_TOKEN" ) ;
2726
2827 public bool ShouldPushGitHubPackages ( ) => ! ShouldNotPublish
2928 && ! string . IsNullOrWhiteSpace ( GitHubNuGetSource )
3029 && ! string . IsNullOrWhiteSpace ( GitHubNuGetApiKey ) ;
3130
32- public string NuGetSource { get ; } = System . Environment . GetEnvironmentVariable ( "NUGET_SOURCE" ) ;
33- public string NuGetApiKey { get ; } = System . Environment . GetEnvironmentVariable ( "NUGET_APIKEY" ) ;
31+ public string ? NuGetSource { get ; } = System . Environment . GetEnvironmentVariable ( "NUGET_SOURCE" ) ;
32+ public string ? NuGetApiKey { get ; } = System . Environment . GetEnvironmentVariable ( "NUGET_APIKEY" ) ;
3433 public bool ShouldPushNuGetPackages ( ) => IsMainBranch &&
3534 ! ShouldNotPublish &&
3635 ! string . IsNullOrWhiteSpace ( NuGetSource ) &&
@@ -49,9 +48,9 @@ public bool ShouldPushNuGetPackages() => IsMainBranch &&
4948 System . Environment . GetEnvironmentVariable ( "AZURE_AUTHORITY_HOST" )
5049 ) ;
5150
52- public string AzureStorageAccount { get ; } = System . Environment . GetEnvironmentVariable ( "AZURE_STORAGE_ACCOUNT" ) ;
51+ public string ? AzureStorageAccount { get ; } = System . Environment . GetEnvironmentVariable ( "AZURE_STORAGE_ACCOUNT" ) ;
5352
54- public string AzureStorageAccountContainer { get ; } = System . Environment . GetEnvironmentVariable ( "AZURE_STORAGE_ACCOUNT_CONTAINER" ) ;
53+ public string ? AzureStorageAccountContainer { get ; } = System . Environment . GetEnvironmentVariable ( "AZURE_STORAGE_ACCOUNT_CONTAINER" ) ;
5554
5655 public bool ShouldRunIntegrationTests ( ) => ! string . IsNullOrWhiteSpace ( AzureStorageAccount ) &&
5756 ! string . IsNullOrWhiteSpace ( AzureStorageAccountContainer ) &&
@@ -62,15 +61,16 @@ public bool ShouldRunIntegrationTests() => !string.IsNullOrWhiteSpace(AzureStor
6261}
6362
6463public record AzureCredentials (
65- string TenantId ,
66- string ClientId ,
67- string ClientSecret ,
68- string AuthorityHost = "login.microsoftonline.com"
64+ string ? TenantId ,
65+ string ? ClientId ,
66+ string ? ClientSecret ,
67+ string ? AuthorityHost = "login.microsoftonline.com"
6968)
7069{
7170 public bool AzureCredentialsSpecified { get ; } = ! string . IsNullOrWhiteSpace ( TenantId ) &&
7271 ! string . IsNullOrWhiteSpace ( ClientId ) &&
7372 ! string . IsNullOrWhiteSpace ( ClientSecret ) &&
7473 ! string . IsNullOrWhiteSpace ( AuthorityHost ) ;
7574}
76- private record ExtensionHelper ( Func < string , CakeTaskBuilder > TaskCreate , Func < CakeReport > Run ) ;
75+ internal record ExtensionHelper ( Func < string , CakeTaskBuilder > TaskCreate , Func < CakeReport > Run ) ;
76+
0 commit comments