修改发布压缩
parent
35435e856d
commit
723f1495ef
|
@ -884,7 +884,7 @@ namespace PublishSite
|
||||||
|
|
||||||
var desTinationFoder = Path.GetDirectoryName(binPath);
|
var desTinationFoder = Path.GetDirectoryName(binPath);
|
||||||
|
|
||||||
sshNetCorePublishBtn.Enabled = false;
|
|
||||||
var filePath = publishFileTBox.Text;
|
var filePath = publishFileTBox.Text;
|
||||||
var realName = Path.GetFileName(filePath);
|
var realName = Path.GetFileName(filePath);
|
||||||
|
|
||||||
|
@ -902,11 +902,14 @@ namespace PublishSite
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sshNetCorePublishBtn.Enabled = false;
|
||||||
|
|
||||||
WinformLog($"开始上传后端部署文件{realName}...");
|
WinformLog($"开始上传后端部署文件{realName}...");
|
||||||
|
|
||||||
await NetCoreZipPublishAsync(filePath, desTinationFoder);
|
await NetCoreZipPublishAsync(filePath, desTinationFoder);
|
||||||
|
|
||||||
WinformLog($"后端发布结束");
|
WinformLog($"后端发布结束");
|
||||||
|
|
||||||
sshNetCorePublishBtn.Enabled = true;
|
sshNetCorePublishBtn.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -994,12 +997,14 @@ namespace PublishSite
|
||||||
private async void sshNetCorePublishBtn2_Click(object sender, EventArgs e)
|
private async void sshNetCorePublishBtn2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(publishFolderTBox.Text))
|
if (string.IsNullOrEmpty(publishFolderTBox.Text))
|
||||||
{
|
{
|
||||||
WinformLog($"请选择存在的文件夹才能开始发布", Color.Red);
|
WinformLog($"请选择存在的文件夹才能开始发布", Color.Red);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sshNetCorePublishBtn2.Enabled = false;
|
||||||
|
|
||||||
var binPath = jObjectCofig["DefaultService"]["BinPath"].ToString();
|
var binPath = jObjectCofig["DefaultService"]["BinPath"].ToString();
|
||||||
|
|
||||||
|
@ -1007,7 +1012,7 @@ namespace PublishSite
|
||||||
|
|
||||||
var desTinationFoder = Path.GetDirectoryName(binPath);
|
var desTinationFoder = Path.GetDirectoryName(binPath);
|
||||||
|
|
||||||
sshNetCorePublishBtn2.Enabled = false;
|
|
||||||
|
|
||||||
WinformLog($"开始打包该文件夹下的内容...");
|
WinformLog($"开始打包该文件夹下的内容...");
|
||||||
|
|
||||||
|
@ -1023,8 +1028,7 @@ namespace PublishSite
|
||||||
await Task.Run( () =>
|
await Task.Run( () =>
|
||||||
{
|
{
|
||||||
//将文件夹里的内容打包成压缩包
|
//将文件夹里的内容打包成压缩包
|
||||||
ZipFile.CreateFromDirectory(localSourceFolder, filePath);
|
ZipFile.CreateFromDirectory(localSourceFolder, filePath,CompressionLevel.Fastest,true);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue