public void Run(ProgressWriter progressWriter)
 {
     foreach (var buildTarget in buildTargetCollection)
     {
         string workspacePath = buildTarget.GetWorkspacePath();
         FileTransfer.CopyDirectoryFiles(buildTarget.GetTranspiledPath(), workspacePath, false);
         progressWriter.IncrementAndWrite();
         FileTransfer.CopyDirectoryFiles(buildTarget.GetDependenciesPath(), workspacePath, true);//WTM:  Note:  Dependencies often (or possibly always) conflict.
         progressWriter.IncrementAndWrite();
     }
 }
Example #2
0
        public void Run()
        {
            Build build = null;//WTM:  Change:  BuildTargetFactory.get takes two arguments, but in PHP, it was invoked with one argument.  This file will fail to run.

            using (BuildLogServices buildLogServices = new BuildLogServices(build))
            {
                BuildTarget buildTarget = BuildTargetFactory.Get(this.buildTarget, build, buildLogServices);
                int         latestBuild = Directory.EnumerateFileSystemEntries(buildTarget.GetArchivePath())
                                          .Select(path => Path.GetFileName(path))
                                          .Select(name =>
                {
                    int fileBuild;
                    return(int.TryParse(name, out fileBuild) ? fileBuild : 0);
                })
                                          .Max();
                int archivedBuild = latestBuild + 1;
                Directory.CreateDirectory(buildTarget.GetArchivedBuildPath(archivedBuild));
                //WTM:  Change:  buildTarget.getBuildPath() is not a valid method.
                string sourcePath      = null;//buildTarget.getBuildPath()
                string destinationPath = buildTarget.GetArchivedBuildPath(archivedBuild);
                FileTransfer.CopyDirectoryFiles(sourcePath, destinationPath, false);
            }
            Process.Start("clean.sh", this.buildTarget);
        }