public static SvnResultsVersion SvnVersion(this ICakeContext context, string localPath) { SvnVersion task = new SvnVersion(context) { LocalPath = localPath }; string actualCommand = GetToolTaskCommand(task); string actualCommand2 = GetToolTaskToolPath(task); var bOk = task.Execute(); if (task.ExitCode != 0) { //-- fail } return(new SvnResultsVersion() { Exported = task.Exported, LowRevision = task.LowRevision, Modifications = task.Modifications, Revision = task.Revision, Switched = task.Switched, ExitCode = task.ExitCode, }); }
public void SvnVersionExecute() { SvnVersion task = new SvnVersion(); task.BuildEngine = new MockBuild(); string prjRootPath = TaskUtility.getProjectRootDirectory(true); task.LocalPath = Path.Combine(prjRootPath, @"Source"); Assert.IsTrue(task.Execute(), "Execute Failed"); Assert.IsTrue(task.Revision > 0, "Invalid Revision Number"); }
public void SvnVersionExecute() { var context = new Cake.VersionReader.Tests.Fakes.FakeCakeContext(); SvnVersion task = new SvnVersion(context.CakeContext); task.BuildEngine = new MockBuild(); string prjRootPath = TaskUtility.GetProjectRootDirectory(true); task.LocalPath = Path.Combine(prjRootPath, @"Source"); Assert.IsTrue(task.Execute(), "Execute Failed"); Assert.IsTrue(task.Revision > 0, "Invalid Revision Number"); }