public static SvnResultsBase SvnExport(this ICakeContext context, string repositorypath, string localPath, bool force, string username, string password) { SvnResultsBase results = new SvnResultsBase(); SvnExport task = new SvnExport(context) { Username = username, Password = password, RepositoryPath = repositorypath, LocalPath = localPath, Force = force }; string actualCommand = GetToolTaskCommand(task); string actualCommand2 = GetToolTaskToolPath(task); var bOk = task.Execute(); if (task.ExitCode != 0) { //-- fail } results.RepositoryPath = task.RepositoryPath ?? ""; results.Revision = task.Revision; results.StandardOutput = task.StandardOutput ?? ""; results.StandardError = task.StandardError ?? ""; results.ExitCode = task.ExitCode; return(results); }
public static SvnResultsBase SvnCopy(this ICakeContext context, string message, string sourcePath, string destinationPath, string taglabel, string username, string password) { SvnResultsBase results = new SvnResultsBase(); SvnCopy task = new SvnCopy(context) { Username = username, Password = password, SourcePath = sourcePath, DestinationPath = destinationPath, Message = message }; string actualCommand = GetToolTaskCommand(task); string actualCommand2 = GetToolTaskToolPath(task); var bOk = task.Execute(); if (task.ExitCode != 0) { //-- fail } results.RepositoryPath = task.RepositoryPath ?? ""; results.Revision = task.Revision; results.StandardOutput = task.StandardOutput ?? ""; results.StandardError = task.StandardError ?? ""; results.ExitCode = task.ExitCode; return(results); }
public static SvnResultsBase SvnAdd(this ICakeContext context, string localPath) { SvnResultsBase results = new SvnResultsBase(); SvnAdd task = new SvnAdd(context) { //LocalPath = localPath, }; var itemsTaskItems = new List <ITaskItem>(); itemsTaskItems.Add(new XmlNodeTaskItem("Include", localPath, "ToCommit")); task.Targets = itemsTaskItems.ToArray(); string actualCommand = GetToolTaskCommand(task); string actualCommand2 = GetToolTaskToolPath(task); var bOk = task.Execute(); if (task.ExitCode != 0) { //-- fail } results.RepositoryPath = task.RepositoryPath ?? ""; results.Revision = task.Revision; results.StandardOutput = task.StandardOutput ?? ""; results.StandardError = task.StandardError ?? ""; results.ExitCode = task.ExitCode; return(results); }
public static SvnResultsBase SvnUpdate(this ICakeContext context, string localPath) { SvnResultsBase results = new SvnResultsBase(); SvnUpdate task = new SvnUpdate(context) { LocalPath = localPath }; string actualCommand = GetToolTaskCommand(task); string actualCommand2 = GetToolTaskToolPath(task); var bOk = task.Execute(); if (task.ExitCode != 0) { //-- fail } results.RepositoryPath = task.RepositoryPath ?? ""; results.Revision = task.Revision; results.StandardOutput = task.StandardOutput ?? ""; results.StandardError = task.StandardError ?? ""; results.ExitCode = task.ExitCode; return(results); }
public static SvnResultsBase SvnCommit(this ICakeContext context, string message, string localPath, List <string> targetsinclude, //List<string> targetsexclude, string username, string password) { SvnResultsBase results = new SvnResultsBase(); SvnCommit task = new SvnCommit(context) { LocalPath = localPath, Message = message, Username = username, Password = password }; var itemsTaskItems = new List <ITaskItem>(); foreach (var target in targetsinclude) { var targetPath = Path.Combine(localPath, target); if (File.Exists(targetPath)) { itemsTaskItems.Add(new XmlNodeTaskItem("Include", targetPath, "ToCommit")); } else if (File.Exists(target)) { itemsTaskItems.Add(new XmlNodeTaskItem("Include", target, "ToCommit")); } //itemsTaskItems.Add(new XmlNodeTaskItem("Include", targetPath, "ToCommit")); } task.Targets = itemsTaskItems.ToArray(); string actualCommand = GetToolTaskCommand(task); string actualCommand2 = GetToolTaskToolPath(task); var bOk = task.Execute(); if (task.ExitCode != 0) { //-- fail } results.RepositoryPath = task.RepositoryPath ?? ""; results.Revision = task.Revision; results.StandardOutput = task.StandardOutput ?? ""; results.StandardError = task.StandardError ?? ""; results.ExitCode = task.ExitCode; return(results); }