public static Tool GetLocalTool(string absoluteOrRelativePath) { var toolPath = PathConstruction.HasPathRoot(absoluteOrRelativePath) ? absoluteOrRelativePath : Path.Combine(NukeBuild.RootDirectory, absoluteOrRelativePath); Assert.FileExists(toolPath); return(new ToolExecutor(toolPath).Execute); }
// TODO: allow wildcard matching? [Solution("nuke-*.sln")] -- no globbing? // TODO: for just [Solution] without parameter being passed, do wildcard search? private string GetSolutionFile(string memberName) { var parameter = ParameterService.Instance.GetParameter <string>(memberName); if (parameter != null) { return(PathConstruction.HasPathRoot(parameter) ? parameter : PathConstruction.Combine(EnvironmentInfo.WorkingDirectory, parameter)); } if (_solutionFileRootRelativePath != null) { return(PathConstruction.Combine(NukeBuild.Instance.RootDirectory, _solutionFileRootRelativePath)); } return(NukeBuild.Instance.SolutionFile); }