From 1e033e2ca38b4f963fb4ed0a3a48bbef3bfb9024 Mon Sep 17 00:00:00 2001
From: zerlei <1445089819@qq.com>
Date: Fri, 11 Oct 2024 16:32:36 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=AE=E4=B8=8D=E5=A4=9A=E6=90=9E?=
=?UTF-8?q?=E5=AE=8C=E4=BA=86=EF=BC=8C=E8=BF=98=E6=9C=89=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E7=AE=80=E5=8D=95=E7=9A=84=E8=84=9A=E6=9C=AC=EF=BC=8C=E8=BF=98?=
=?UTF-8?q?=E6=9C=89=E4=B8=80=E4=BA=9B=E6=B5=8B=E8=AF=95=EF=BC=8C=E5=AE=9E?=
=?UTF-8?q?=E9=99=85=E7=9A=84=E6=AD=A3=E5=BC=8F=E6=B5=8B=E8=AF=95=EF=BC=8C?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=A3=8E=E6=A0=BC=EF=BC=8C=E6=96=87=E6=A1=A3?=
=?UTF-8?q?=E7=AD=89=E7=9A=84=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Server/LocalServer/Program.cs | 3 +++
Server/LocalServer/StateHelper.cs | 7 +++++--
.../Controllers/RemoteServerController.cs | 11 +++++-----
Server/ServerTest/PipeSeed.cs | 4 ++--
Server/ServerTest/PipeTest.cs | 4 ++--
Tool/webtool/src/App.vue | 20 +++++++++++++++----
6 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/Server/LocalServer/Program.cs b/Server/LocalServer/Program.cs
index 44cae58..e7c007d 100644
--- a/Server/LocalServer/Program.cs
+++ b/Server/LocalServer/Program.cs
@@ -11,6 +11,9 @@ IConfiguration _configuration = configurationBuilder.Build();
LocalSyncServer.TempRootFile = _configuration["TempDir"] ?? "C:/TempPack";
LocalSyncServer.SqlPackageAbPath =
_configuration["SqlPackageAbPath"] ?? "C:\\Users\\ZHAOLEI\\.dotnet\\tools\\sqlpackage.exe";
+LocalSyncServer.MSBuildAbPath =
+ _configuration["MSBuildAbPath"]
+ ?? "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\MSBuild.exe";
//LocalSyncServer.MsdeployAbPath =
// _configuration["MsdeployAbPath"]
diff --git a/Server/LocalServer/StateHelper.cs b/Server/LocalServer/StateHelper.cs
index 01a617e..dd7fc00 100644
--- a/Server/LocalServer/StateHelper.cs
+++ b/Server/LocalServer/StateHelper.cs
@@ -165,8 +165,8 @@ public class DeployHelper(LocalSyncServer context)
FileName = LocalSyncServer.MSBuildAbPath, // The command to execute (can be any command line tool)
Arguments =
$" {Context.NotNullSyncConfig.LocalProjectAbsolutePath} /t:ResolveReferences"
- + $" /t:Compile /p:Configuration=Release /t:_CopyWebApplication /p:OutputPath={LocalSyncServer.TempRootFile}/bin"
- + $" /p:WebProjectOutputDir={LocalSyncServer.TempRootFile}",
+ + $" /t:Compile /p:Configuration=Release /t:_CopyWebApplication /p:OutputPath={Context.NotNullSyncConfig.LocalRootPath}/bin"
+ + $" /p:WebProjectOutputDir={Context.NotNullSyncConfig.LocalRootPath}",
// The arguments to pass to the command (e.g., list directory contents)
RedirectStandardOutput = true, // Redirect the standard output to a string
RedirectStandardError = true,
@@ -187,6 +187,9 @@ public class DeployHelper(LocalSyncServer context)
if (bprocess.ExitCode == 0)
{
Context.LocalPipe.SendMsg(CreateMsg("本地编译成功!")).Wait();
+ var h = new DiffFileAndPackHelper(Context);
+ Context.SetStateHelper(h);
+ h.DiffProcess();
}
else
{
diff --git a/Server/RemoteServer/Controllers/RemoteServerController.cs b/Server/RemoteServer/Controllers/RemoteServerController.cs
index d8a447d..8d3acfa 100644
--- a/Server/RemoteServer/Controllers/RemoteServerController.cs
+++ b/Server/RemoteServer/Controllers/RemoteServerController.cs
@@ -165,7 +165,7 @@ public class SyncFilesController(RemoteSyncServerFactory factory, SqliteDbContex
}
[HttpPost("/UploadFile")]
- public async Task