private void BuildGameImpl(IEnumerable <Type> typesToInclude, IEnumerable <string> additionalOptions) { _steps = GetFinalSteps(typesToInclude, additionalOptions); var registry = new OptionsRegistry(); registry.Collect(_steps); var cmdOptions = registry.ProcessOptions(additionalOptions); var envOptions = registry.ProcessEnvironment(); var optionsStr = string.Join("\n", cmdOptions.Concat(envOptions).Select(t => $" '{t.Item1}' = '{t.Item2}'")); Debug.Log($"Running build with options:\n{optionsStr}"); DumpBuildParameters(); foreach (var a in _steps.OfType <IRunPreBuild>()) { a.OnPreBuild(this); } foreach (var a in _steps.OfType <IRunPostBuild>().Reverse()) { a.OnPostBuild(this); } }
public void ParseEnvVariableOption() { var r = new OptionsRegistry(); var s = new OptionsBag(); r.Collect(new[] { s }); Environment.SetEnvironmentVariable("str", "value"); r.ProcessEnvironment(); Assert.That(s.StringProp, Is.EqualTo("value")); }