packaging
This commit is contained in:
3
Makefile
3
Makefile
@ -14,4 +14,7 @@ pushInPre:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
make -C src/Yavsc.Abstract pack
|
make -C src/Yavsc.Abstract pack
|
||||||
|
make -C src/Yavsc.Server pack
|
||||||
|
make -C src/Yavsc pack
|
||||||
|
|
||||||
|
.PHONY: packages
|
||||||
|
@ -1 +1 @@
|
|||||||
02
|
03
|
||||||
|
@ -26,8 +26,6 @@ namespace Yavsc.Attributes.Validation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string errorMessageResourceName;
|
|
||||||
|
|
||||||
public override bool IsValid(object value) {
|
public override bool IsValid(object value) {
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<version>$version$</version>
|
<version>$version$</version>
|
||||||
<authors>Paul Schneider</authors>
|
<authors>Paul Schneider</authors>
|
||||||
<owners>Paul Schneider</owners>
|
<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>
|
<projectUrl>https://github.com/pazof/yavsc/blob/vnext/README.md</projectUrl>
|
||||||
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
||||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
<description>
|
<description>
|
||||||
|
@ -19,23 +19,16 @@ namespace Yavsc.Server.Models.IT.SourceCode
|
|||||||
// Model annotations => input.Repository!=null => input.Name == input.Repository.Path
|
// Model annotations => input.Repository!=null => input.Name == input.Repository.Path
|
||||||
var prjPath = Path.Combine(WorkingDir, input.Name);
|
var prjPath = Path.Combine(WorkingDir, input.Name);
|
||||||
var repoInfo = new DirectoryInfo(prjPath);
|
var repoInfo = new DirectoryInfo(prjPath);
|
||||||
|
var makeStart = CreateStartInfo(prjPath);
|
||||||
|
|
||||||
var args = string.Join(" ", Args);
|
var args = string.Join(" ", Args);
|
||||||
|
|
||||||
var cloneStart = new ProcessStartInfo
|
|
||||||
( _cmdPath, args )
|
|
||||||
{
|
|
||||||
WorkingDirectory = prjPath,
|
|
||||||
RedirectStandardOutput = true,
|
|
||||||
UseShellExecute = false
|
|
||||||
};
|
|
||||||
// TODO make `.ansi.log` a defined constant.
|
// TODO make `.ansi.log` a defined constant.
|
||||||
var logFile = new FileInfo
|
var logFile = new FileInfo(Path.Combine(_repositoryRootPath, LogPath));
|
||||||
( Path.Combine
|
|
||||||
( _repositoryRootPath, $"{input.Name}.ansi.log" ));
|
|
||||||
using (var stream = logFile.Create())
|
using (var stream = logFile.Create())
|
||||||
using (var writer = new StreamWriter(stream))
|
using (var writer = new StreamWriter(stream))
|
||||||
{
|
{
|
||||||
var process = Process.Start(cloneStart);
|
var process = Process.Start(makeStart);
|
||||||
// TODO announce ...
|
// TODO announce ...
|
||||||
while (!process.HasExited)
|
while (!process.HasExited)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace Yavsc.Server.Models.IT.SourceCode
|
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.");
|
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>
|
<version>$version$</version>
|
||||||
<authors>Paul Schneider</authors>
|
<authors>Paul Schneider</authors>
|
||||||
<owners>Paul Schneider</owners>
|
<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>
|
<projectUrl>https://github.com/pazof/yavsc/README.md</projectUrl>
|
||||||
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
||||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<version>$version$</version>
|
<version>$version$</version>
|
||||||
<authors>Paul Schneider</authors>
|
<authors>Paul Schneider</authors>
|
||||||
<owners>Paul Schneider</owners>
|
<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>
|
<projectUrl>https://github.com/pazof/yavsc/README.md</projectUrl>
|
||||||
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
||||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
|
20
src/cli/Commands/Builder.cs
Normal file
20
src/cli/Commands/Builder.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using Yavsc.Server.Models.IT.SourceCode;
|
||||||
|
|
||||||
|
public class Builder {
|
||||||
|
|
||||||
|
|
||||||
|
public void Clone()
|
||||||
|
{
|
||||||
|
var firstProject = _dbContext.Project.Include(p=>p.Repository).FirstOrDefault();
|
||||||
|
Assert.NotNull (firstProject);
|
||||||
|
var di = new DirectoryInfo(_serverFixture.SiteSetup.GitRepository);
|
||||||
|
if (!di.Exists) di.Create();
|
||||||
|
|
||||||
|
|
||||||
|
var clone = new GitClone(_serverFixture.SiteSetup.GitRepository);
|
||||||
|
clone.Launch(firstProject);
|
||||||
|
gitRepo = di.FullName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
11
src/cli/Commands/Streamer.cs
Normal file
11
src/cli/Commands/Streamer.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using System.Net.WebSockets;
|
||||||
|
|
||||||
|
public class Streamer {
|
||||||
|
private ClientWebSocket _client;
|
||||||
|
|
||||||
|
public Streamer(string token)
|
||||||
|
{
|
||||||
|
_client = new ClientWebSocket();
|
||||||
|
_client.Options.SetRequestHeader("Authorization", $"Bearer {token}");
|
||||||
|
}
|
||||||
|
}
|
@ -48,15 +48,15 @@
|
|||||||
"Newtonsoft.Json": "9.0.1",
|
"Newtonsoft.Json": "9.0.1",
|
||||||
"NJsonSchema.CodeGeneration.CSharp": "9.10.65",
|
"NJsonSchema.CodeGeneration.CSharp": "9.10.65",
|
||||||
"Yavsc": {
|
"Yavsc": {
|
||||||
"version": "1.0.5-rc22",
|
"version": "1.0.6-rc03",
|
||||||
"target": "package"
|
"target": "package"
|
||||||
},
|
},
|
||||||
"Yavsc.Abstract": {
|
"Yavsc.Abstract": {
|
||||||
"version": "1.0.5-rc22",
|
"version": "1.0.6-rc03",
|
||||||
"target": "package"
|
"target": "package"
|
||||||
},
|
},
|
||||||
"Yavsc.Server": {
|
"Yavsc.Server": {
|
||||||
"version": "1.0.5-rc22",
|
"version": "1.0.6-rc03",
|
||||||
"target": "package"
|
"target": "package"
|
||||||
},
|
},
|
||||||
"Microsoft.Dnx.Host": "1.0.0-rc1-final",
|
"Microsoft.Dnx.Host": "1.0.0-rc1-final",
|
||||||
|
Reference in New Issue
Block a user