public FlubuConfiguration( TravisOptions travisOptions, AzurePipelineOptions azureOptions, GitHubActionsOptions gitHubActionsOptions, AppVeyorOptions appVeyorOptions, JenkinsOptions jenkinsOptions) { TravisOptions = travisOptions; AzurePipelineOptions = azureOptions; GitHubActionsOptions = gitHubActionsOptions; AppVeyorOptions = appVeyorOptions; JenkinsOptions = jenkinsOptions; }
public void FromOptions(TravisOptions options) { Language = options.Language; OSXImage = options.OsImage; Sudo = options.Sudo; Dist = options.Dist; Dotnet = options.DotnetVersion; Mono = options.Mono; if (!options.Os.IsNullOrEmpty()) { Os = new List <string>(); foreach (var os in options.Os) { switch (os) { case TravisOs.Linux: Os.Add("linux"); break; case TravisOs.Windows: Os.Add("windows"); break; case TravisOs.MacOS: Os.Add("osx"); break; } } } if (options.Scripts.IsNullOrEmpty()) { Script = options.Scripts; } Script = options.Scripts; if (!options.Services.IsNullOrEmpty()) { Services = options.Services; } if (!options.BeforeScript.IsNullOrEmpty()) { BeforeScript = options.BeforeScript; } if (!options.ScriptsAfter.IsNullOrEmpty()) { Script.AddRange(options.ScriptsAfter); } if (!options.Install.IsNullOrEmpty()) { Install = options.Install; } if (!options.EnvironemtVariables.IsNullOrEmpty()) { Env = options.EnvironemtVariables; } if (!options.BranchesOnly.IsNullOrEmpty()) { Branches = new Branches() { Only = options.BranchesOnly }; } }