packaging
This commit is contained in:
@ -19,23 +19,16 @@ namespace Yavsc.Server.Models.IT.SourceCode
|
||||
// Model annotations => input.Repository!=null => input.Name == input.Repository.Path
|
||||
var prjPath = Path.Combine(WorkingDir, input.Name);
|
||||
var repoInfo = new DirectoryInfo(prjPath);
|
||||
var makeStart = CreateStartInfo(prjPath);
|
||||
|
||||
var args = string.Join(" ", Args);
|
||||
|
||||
var cloneStart = new ProcessStartInfo
|
||||
( _cmdPath, args )
|
||||
{
|
||||
WorkingDirectory = prjPath,
|
||||
RedirectStandardOutput = true,
|
||||
UseShellExecute = false
|
||||
};
|
||||
// TODO make `.ansi.log` a defined constant.
|
||||
var logFile = new FileInfo
|
||||
( Path.Combine
|
||||
( _repositoryRootPath, $"{input.Name}.ansi.log" ));
|
||||
var logFile = new FileInfo(Path.Combine(_repositoryRootPath, LogPath));
|
||||
using (var stream = logFile.Create())
|
||||
using (var writer = new StreamWriter(stream))
|
||||
{
|
||||
var process = Process.Start(cloneStart);
|
||||
var process = Process.Start(makeStart);
|
||||
// TODO announce ...
|
||||
while (!process.HasExited)
|
||||
{
|
||||
|
@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace Yavsc.Server.Models.IT.SourceCode
|
||||
@ -17,5 +19,18 @@ namespace Yavsc.Server.Models.IT.SourceCode
|
||||
throw new Exception ($"This directory doesn't exist: {WorkingDir},\nand cannot be used as a repository.");
|
||||
}
|
||||
|
||||
public ProcessStartInfo CreateStartInfo(string workingDir)
|
||||
{
|
||||
var args = string.Join(" ", Args);
|
||||
var info = new ProcessStartInfo
|
||||
( _cmdPath, args )
|
||||
{
|
||||
WorkingDirectory = workingDir ?? WorkingDir,
|
||||
RedirectStandardOutput = true,
|
||||
UseShellExecute = false
|
||||
};
|
||||
return info;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
<version>$version$</version>
|
||||
<authors>Paul Schneider</authors>
|
||||
<owners>Paul Schneider</owners>
|
||||
<licenseUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/License.md</licenseUrl>
|
||||
<license type="expression">GPL-3.0-or-later</license>
|
||||
<projectUrl>https://github.com/pazof/yavsc/README.md</projectUrl>
|
||||
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
|
Reference in New Issue
Block a user