Skip to content

Commit

Permalink
本地镜像发布,支持SkipExistingImages
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzd committed Mar 24, 2023
1 parent fa28f5d commit c709b49
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 26 deletions.
Binary file modified AntDeploy2022/AntDeployV2/AntDeployApp.exe
Binary file not shown.
Binary file modified AntDeploy2022/AntDeployV2/AntDeployWinform.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion AntDeploy2022/AntDeployV2/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="AntDeployV2.7c9b7525-17b5-4862-91fd-75e80893e476" Version="3.1" Language="en-US" Publisher="yuzd" />
<Identity Id="AntDeployV2.7c9b7525-17b5-4862-91fd-75e80893e476" Version="3.2" Language="en-US" Publisher="yuzd" />
<DisplayName>AntDeployV2</DisplayName>
<Description xml:space="preserve">Tools to deploy applications to remote server(iis,windowsService,docker) support netframwork and dotnetcore,support rollback and increment deploy</Description>
<MoreInfo>https://github.com/yuzd</MoreInfo>
Expand Down
Binary file modified AntDeploy2022/AntDeployV2/zh-CN/AntDeployWinform.resources.dll
Binary file not shown.
Binary file modified AntDeploy2022/AntDeployV2/zh-Hans/AntDeployWinform.resources.dll
Binary file not shown.
Binary file modified AntDeploy2022/AntDeployV2/zh/AntDeployWinform.resources.dll
Binary file not shown.
3 changes: 3 additions & 0 deletions AntDeployWinform/Models/DeployConfig.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using LibGit2Sharp;

namespace AntDeployWinform.Models
{
Expand Down Expand Up @@ -134,6 +135,7 @@ public static DockerImageConfigGo get(DockerImageConfig config)
d.Entrypoint = config.Entrypoint;
d.Cmd = config.Cmd;
d.IgnoreList = config.IgnoreList;
d.SkipExistingImages = config.SkipExistingImages;
return d;
}
}
Expand All @@ -158,6 +160,7 @@ public DockerImageConfig()
public string[] Entrypoint { get; set; }
public string[] Cmd { get; set; }
public List<string> IgnoreList { get; set; }
public bool SkipExistingImages { get; set; }

}

Expand Down
2 changes: 1 addition & 1 deletion AntDeployWinform/Vsix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public static class Vsix
{
public const string FORM_NAME = "AntDeploy("+VERSION+")";
public const string VERSION = "7.51";
public const string VERSION = "7.52";
public const string AGENTVERSION = "7.1";
public const string PRODUCT = "yuzd";
public const string PACKAGE = "AntDeploy";
Expand Down
10 changes: 10 additions & 0 deletions AntDeployWinform/Winform/Deploy.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 24 additions & 9 deletions AntDeployWinform/Winform/Deploy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ private void Reload()
this.txt_Cmd.Text = DeployConfig.DockerImageConfig.Cmd != null && DeployConfig.DockerImageConfig.Cmd.Any() ? string.Join("->", DeployConfig.DockerImageConfig.Cmd) : "";
this.txt_TargetHttpProxy.Text = DeployConfig.DockerImageConfig.TargetHttpProxy;
this.cmbo_ImageFormat.SelectedItem = DeployConfig.DockerImageConfig.ImageFormat;
this.cbx_SkipExistingImages.Checked = DeployConfig.DockerImageConfig.SkipExistingImages;
if (DeployConfig.DockerImageConfig.IgnoreList != null)
{
foreach (var item in DeployConfig.DockerImageConfig.IgnoreList)
Expand Down Expand Up @@ -7918,6 +7919,7 @@ private void EnableForDockerImage(bool flag, bool ignore = false)
this.page_linux_service.Enabled = flag;
this.page_window_service.Enabled = flag;
this.pag_advance_setting.Enabled = flag;
this.cbx_SkipExistingImages.Enabled = flag;
});

Expand Down Expand Up @@ -10014,7 +10016,7 @@ private void dockerImageParams()
DeployConfig.DockerImageConfig.TargetHttpProxy = this.txt_TargetHttpProxy.Text;
DeployConfig.DockerImageConfig.Entrypoint = (this.txt_Entrypoint.Text ?? string.Empty).Split(new string[] { "->" }, StringSplitOptions.None).ToArray();
DeployConfig.DockerImageConfig.Cmd = (this.txt_Cmd.Text ?? string.Empty).Split(new string[] { "->" }, StringSplitOptions.None).ToArray();

DeployConfig.DockerImageConfig.SkipExistingImages = this.cbx_SkipExistingImages.Checked;


}
Expand Down Expand Up @@ -10049,16 +10051,24 @@ private void altoButton1_Click(object sender, EventArgs e)
{
DeployConfig.DockerImageConfig.ImageFormat = "Docker";
}
if (string.IsNullOrEmpty(PluginConfig.DeployFolderPath) && !ProjectHelper.CheckDockerFileIsSetCopy(ProjectPath))
// if (string.IsNullOrEmpty(PluginConfig.DeployFolderPath) && !ProjectHelper.CheckDockerFileIsSetCopy(ProjectPath))
// {
// var confirmDockerfile = ShowInputMsgBox(Strings.DockerFileWarn,
// Strings.DockerFileNotSetCopy, "hide");
// if (!confirmDockerfile.Item1)
// {
// return;
// }
// }
this.rich_docker_image_log.Text = "";
if (DeployConfig.DockerImageConfig.IgnoreList == null)
{
var confirmDockerfile = ShowInputMsgBox(Strings.DockerFileWarn,
Strings.DockerFileNotSetCopy, "hide");
if (!confirmDockerfile.Item1)
{
return;
}
DeployConfig.DockerImageConfig.IgnoreList = new List<string> { "AntDeploy.json" };
}
else if (!DeployConfig.DockerImageConfig.IgnoreList.Contains("AntDeploy.json"))
{
DeployConfig.DockerImageConfig.IgnoreList.Add("AntDeploy.json");
}
this.rich_docker_image_log.Text = "";


new Task(() =>
Expand Down Expand Up @@ -10256,5 +10266,10 @@ private void saveAntDeployJson()
if (GlobalConfig.EnableAntDeployJson && !string.IsNullOrEmpty(ProjectConfigPath.Item2)) File.WriteAllText(ProjectConfigPath.Item2, configJson, Encoding.UTF8);
}
}

private void cbx_SkipExistingImages_Click(object sender, EventArgs e)
{
DeployConfig.DockerImageConfig.SkipExistingImages = cbx_SkipExistingImages.Checked;
}
}
}
37 changes: 29 additions & 8 deletions AntDeployWinform/Winform/Deploy.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2286,6 +2286,30 @@
<data name="&gt;&gt;tabPage_docker_image.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cbx_SkipExistingImages.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 138</value>
</data>
<data name="cbx_SkipExistingImages.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 18</value>
</data>
<data name="cbx_SkipExistingImages.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
</data>
<data name="cbx_SkipExistingImages.Text" xml:space="preserve">
<value>SkipExistingImages</value>
</data>
<data name="&gt;&gt;cbx_SkipExistingImages.Name" xml:space="preserve">
<value>cbx_SkipExistingImages</value>
</data>
<data name="&gt;&gt;cbx_SkipExistingImages.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbx_SkipExistingImages.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;cbx_SkipExistingImages.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label67.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
Expand Down Expand Up @@ -2314,7 +2338,7 @@
<value>groupBox4</value>
</data>
<data name="&gt;&gt;label67.ZOrder" xml:space="preserve">
<value>0</value>
<value>1</value>
</data>
<data name="btn_dockerImage_ignore_remove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
Expand All @@ -2341,7 +2365,7 @@
<value>groupBox4</value>
</data>
<data name="&gt;&gt;btn_dockerImage_ignore_remove.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="btn_dockerImage_ignore_add.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
Expand All @@ -2368,7 +2392,7 @@
<value>groupBox4</value>
</data>
<data name="&gt;&gt;btn_dockerImage_ignore_add.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="txt_dockerImage_ignore.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value>
Expand All @@ -2389,7 +2413,7 @@
<value>groupBox4</value>
</data>
<data name="&gt;&gt;txt_dockerImage_ignore.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="list_dockerImage_ignore.ItemHeight" type="System.Int32, mscorlib">
<value>12</value>
Expand All @@ -2413,7 +2437,7 @@
<value>groupBox4</value>
</data>
<data name="&gt;&gt;list_dockerImage_ignore.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="groupBox4.Location" type="System.Drawing.Point, System.Drawing">
<value>2, 3</value>
Expand Down Expand Up @@ -6651,9 +6675,6 @@
<data name="&gt;&gt;tabcontrol.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>zh-CN</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand Down
20 changes: 13 additions & 7 deletions AntDeployWinform/Winform/Deploy.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,16 @@
<data name="tabPage_docker_image.Text" xml:space="preserve">
<value>日志</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="cbx_SkipExistingImages.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbx_SkipExistingImages.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 18</value>
</data>
<data name="cbx_SkipExistingImages.Text" xml:space="preserve">
<value>SkipExistingImages</value>
</data>
<data name="btn_dockerImage_ignore_remove.Text" xml:space="preserve">
<value>删除选中</value>
</data>
Expand Down Expand Up @@ -575,12 +585,6 @@
<data name="label52.Location" type="System.Drawing.Point, System.Drawing">
<value>415, 287</value>
</data>
<data name="chk_global_useCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 16</value>
</data>
<data name="chk_global_useCheckBox.Text" xml:space="preserve">
<value>开启环境下服务器可分组功能</value>
</data>
<data name="checkBox_multi_deploy.Location" type="System.Drawing.Point, System.Drawing">
<value>409, 37</value>
</data>
Expand Down Expand Up @@ -665,13 +669,15 @@
<data name="tabcontrol.Size" type="System.Drawing.Size, System.Drawing">
<value>628, 486</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Tile</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>636, 518</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>Inherit</value>
</data>
<data name="$this.MiniDownBack" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABsAAAAWCAYAAAAxSueLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
Expand Down

0 comments on commit c709b49

Please sign in to comment.