public Config Provide(bool applyDefaults = true, Config overrideConfig = null) { var workingDirectory = options.Value.WorkingDirectory; var projectRootDirectory = options.Value.ProjectRootDirectory; var rootDirectory = configFileLocator.HasConfigFileAt(workingDirectory) ? workingDirectory : projectRootDirectory; return(Provide(rootDirectory, applyDefaults, overrideConfig)); }
public Config Provide(bool applyDefaults = true, Config overrideConfig = null) { var workingDirectory = gitPreparer.GetWorkingDirectory(); var projectRootDirectory = gitPreparer.GetProjectRootDirectory(); var rootDirectory = configFileLocator.HasConfigFileAt(workingDirectory) ? workingDirectory : projectRootDirectory; return(Provide(rootDirectory, applyDefaults, overrideConfig)); }
public Config Provide(Config overrideConfig = null) { var gitVersionOptions = options.Value; var workingDirectory = gitVersionOptions.WorkingDirectory; var projectRootDirectory = gitVersionOptions.ProjectRootDirectory; var rootDirectory = configFileLocator.HasConfigFileAt(workingDirectory) ? workingDirectory : projectRootDirectory; return(Provide(rootDirectory, overrideConfig)); }
public static Config Provide(GitPreparer gitPreparer, IConfigFileLocator configFileLocator, bool applyDefaults = true, Config overrideConfig = null) { var workingDirectory = gitPreparer.WorkingDirectory; var projectRootDirectory = gitPreparer.GetProjectRootDirectory(); if (configFileLocator.HasConfigFileAt(workingDirectory)) { return(Provide(workingDirectory, configFileLocator, applyDefaults, overrideConfig)); } return(Provide(projectRootDirectory, configFileLocator, applyDefaults, overrideConfig)); }