public void CopyFiles(FileCopyRequest request) { _fileSystem.CreateDirectory(request.To); // Hack! if (!_fileSystem.DirectoryExists(request.From) && request.From.ToLower().Contains("release")) { var dir = request.From.ToLower().Replace("release", "debug"); if (_fileSystem.DirectoryExists(dir)) { request.From = dir; } } var files = _fileSystem.FindFiles(request.From, request.Matching); if (!files.Any()) { throw new ApplicationException("Unable to find any files matching {1} in {0}".ToFormat(request.From, request.Matching.Include)); } files.Each(f => { _logger.Trace("Copying {0} to {1}", f, request.To); _fileSystem.Copy(f, request.To); }); }
// Tested manually. public void Execute(IRippleStepRunner runner) { string packageFolder; try { packageFolder = _destination.NugetFolderFor(_nuget); } catch (ArgumentOutOfRangeException exc) { RippleLog.Error(ToString(), exc); throw; } runner.CleanDirectory(packageFolder); _nuget.PublishedAssemblies.Each(x => { var request = new FileCopyRequest{ From = x.Directory, Matching = new FileSet{Include = x.Pattern}, To = packageFolder.AppendPath(x.SubFolder.Replace('/', Path.DirectorySeparatorChar)) }; runner.CopyFiles(request); }); }
// Tested manually. public void Execute(IRippleStepRunner runner) { string packageFolder; try { packageFolder = _destination.NugetFolderFor(_nuget); } catch (ArgumentOutOfRangeException exc) { RippleLog.Error(ToString(), exc); throw; } runner.CleanDirectory(packageFolder); _nuget.PublishedAssemblies.Each(x => { var request = new FileCopyRequest { From = x.Directory, Matching = new FileSet { Include = x.Pattern }, To = packageFolder.AppendPath(x.SubFolder.Replace('/', Path.DirectorySeparatorChar)) }; runner.CopyFiles(request); }); }
public void CopyFiles(FileCopyRequest request) { _fileSystem.CreateDirectory(request.To); // Hack! if (!_fileSystem.DirectoryExists(request.From) && request.From.ToLower().Contains("release")) { var dir = request.From.ToLower().Replace("release", "debug"); if (_fileSystem.DirectoryExists(dir)) { request.From = dir; } } var files = _fileSystem.FindFiles(request.From, request.Matching); if (!files.Any()) { throw new ApplicationException("Unable to find any files matching {1} in {0}".ToFormat(request.From, request.Matching.Include)); } files.Each(f => { _logger.Trace("Copying {0} to {1}", f, request.To); _fileSystem.Copy(f, request.To); }); }
public void CopyFiles(FileCopyRequest request) { _fileSystem.CreateDirectory(request.To); var files = _fileSystem.FindFiles(request.From, request.Matching); files.Each(f => { _logger.Trace("Copying {0} to {1}", f, request.To); _fileSystem.Copy(f, request.To); }); }
public bool Equals(FileCopyRequest other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other.Matching, Matching) && Equals(other.From, From) && Equals(other.To, To)); }
// Tested manually. public void Execute(IRippleStepRunner runner) { var packageFolder = _destination.NugetFolderFor(_nuget); runner.CleanDirectory(packageFolder); _nuget.PublishedAssemblies.Each(x => { var request = new FileCopyRequest{ From = x.Directory, Matching = new FileSet{Include = x.Pattern}, To = packageFolder.AppendPath(x.SubFolder.Replace('/', Path.DirectorySeparatorChar)) }; runner.CopyFiles(request); }); }
public void CopyFiles(FileCopyRequest request) { _fileSystem.CreateDirectory(request.To); // Hack! if (!_fileSystem.DirectoryExists(request.From) && request.From.Contains("release")) { var dir = request.From.Replace("release", "debug"); if (_fileSystem.DirectoryExists(dir)) { request.From = dir; } } var files = _fileSystem.FindFiles(request.From, request.Matching); files.Each(f => { _logger.Trace("Copying {0} to {1}", f, request.To); _fileSystem.Copy(f, request.To); }); }
public bool Equals(FileCopyRequest other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Matching, Matching) && Equals(other.From, From) && Equals(other.To, To); }