Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0091af6ae | ||
|
|
70df39c4c8 | ||
|
|
d44f364924 |
|
|
@ -42,23 +42,24 @@ namespace CodeRelease.BLL
|
|||
// 绑定输出和错误数据接收事件
|
||||
process.OutputDataReceived += new DataReceivedEventHandler((sender, e) =>
|
||||
{
|
||||
Log.Logger.Information($"linux执行出错OutputDataReceived,命令{command}");
|
||||
Log.Logger.Information($"linux执行出错OutputDataReceived,Output{JsonConvert.SerializeObject(e)}" );
|
||||
//Log.Logger.Information($"linux执行出错OutputDataReceived,命令{command}");
|
||||
//Log.Logger.Information($"linux执行出错OutputDataReceived,Output{JsonConvert.SerializeObject(e)}");
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
Console.WriteLine($"Output: {e.Data}");
|
||||
outputDataReceived = e.Data;
|
||||
//Console.WriteLine($"Output: {e.Data}");
|
||||
|
||||
outputDataReceived += e.Data + "\n";
|
||||
}
|
||||
});
|
||||
|
||||
process.ErrorDataReceived += new DataReceivedEventHandler((sender, e) =>
|
||||
{
|
||||
Log.Logger.Information($"linux执行出错ErrorDataReceived,命令{command}");
|
||||
Log.Logger.Information($"linux执行出错ErrorDataReceived,Output:{JsonConvert.SerializeObject(e)}");
|
||||
// Log.Logger.Information($"linux执行出错ErrorDataReceived,命令{command}");
|
||||
//Log.Logger.Information($"linux执行出错ErrorDataReceived,Output:{JsonConvert.SerializeObject(e)}");
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
Console.WriteLine($"Error: {e.Data}");
|
||||
errorDataReceived = e.Data;
|
||||
//Console.WriteLine($"Error: {e.Data}");
|
||||
errorDataReceived += e.Data + "\n";
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -74,7 +75,9 @@ namespace CodeRelease.BLL
|
|||
|
||||
// 输出退出代码
|
||||
//Console.WriteLine($"Process exited with code {process.ExitCode}");
|
||||
Log.Logger.Information($"执行结束 {process.ExitCode}");
|
||||
Log.Logger.Information($"执行结束:{process.ExitCode}");
|
||||
Log.Logger.Information($"{outputDataReceived}");
|
||||
Log.Logger.Information($"{errorDataReceived}");
|
||||
exitCode = process.ExitCode;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,11 @@ namespace CodeRelease.Controllers
|
|||
var version = releaseAction.Release.TagName;
|
||||
var mingling = giteaWebhookConfig.MakeFile
|
||||
.Replace("{version}", version)
|
||||
.Replace("{description}", releaseAction.Release.Body)
|
||||
.Replace("{name}", version)
|
||||
//.Replace("{version}", version)
|
||||
//.Replace("{version}", version)
|
||||
//.Replace("{version}", version)
|
||||
//.Replace("{dir_file_path}", download + "/")
|
||||
.Replace("{target_commitish}", releaseAction.Release.TargetCommitish);
|
||||
Log.Logger.Information("执行linux命令{mingling}", mingling);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ app.MapGet("/system", () =>
|
|||
long memoryUsage = currentProcess.WorkingSet64;
|
||||
return new
|
||||
{
|
||||
msg = $"系统版本:{InformationalVersion},启动时间:{startDateTime.ToString("yyyy-MM-dd HH:mm:ss")},已安全运行时间:{DateTime.Now.Subtract(startDateTime).TotalMinutes.ToString("#.##")}分钟",
|
||||
msg = $"系统版本:{InformationalVersion},启动时间:{startDateTime.ToString("yyyy-MM-dd HH:mm:ss")},已安全运行时间:{DateTime.Now.Subtract(startDateTime).TotalMinutes.ToString("0.##")}分钟",
|
||||
InformationalVersion,
|
||||
startDateTime,
|
||||
MemoryUsage = $"{memoryUsage / (1024.0 * 1024.0):F2}MB",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user