publis samo v verzjo
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<TargetFramework>net8.0-windows7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
<AssemblyVersion>2025.02.26.0</AssemblyVersion>
|
||||
<AssemblyVersion>2026.03.20.0</AssemblyVersion>
|
||||
<ApplicationIcon>infosysPublisher.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -44,12 +44,17 @@
|
||||
<TextBox Grid.Row="7" Name="TbOutput" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" IsReadOnly="True"></TextBox>
|
||||
<Grid Grid.Row="8" Margin="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80px"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="80px"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" Name="BtnSettings" Width="80" HorizontalAlignment="Left">Nastavitve</Button>
|
||||
<CheckBox Grid.Column="1" Name="ChbCreateOnlyZip" Width="180" HorizontalAlignment="Left" VerticalAlignment="Center">Pripravi samo zip</CheckBox>
|
||||
<Button Grid.Column="1" Name="BtnPublish" Width="80" HorizontalAlignment="Right">Potrdi</Button>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<CheckBox Name="ChbCreateOnlyZip" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10 0">Pripravi samo zip</CheckBox>
|
||||
<CheckBox Name="ChbPublishToAll" HorizontalAlignment="Left" VerticalAlignment="Center">Publish vsem (vsi brez licence dobijo verzijo)</CheckBox>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Column="2" Name="BtnPublish" Width="80" HorizontalAlignment="Right">Potrdi</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -244,7 +244,8 @@ namespace InfosysPublisher
|
||||
.GetElementsByTagName("variable")
|
||||
.Cast<XmlNode>()
|
||||
.FirstOrDefault(x => x.Attributes != null
|
||||
&& x.Attributes.Cast<XmlAttribute>().Any(y => y.Name == "name" && y.Value == "AplikacijaGuid"));
|
||||
&& x.Attributes.Cast<XmlAttribute>().Any(y => y.Name == "name"
|
||||
&& y.Value is "AplikacijaGuid" or "GuidApplication"));
|
||||
|
||||
if (node != null)
|
||||
tmpSelectedProjectGuid = node.Attributes["value"].Value;
|
||||
@@ -361,6 +362,8 @@ namespace InfosysPublisher
|
||||
return;
|
||||
}
|
||||
|
||||
var publishToAll = ChbPublishToAll.IsChecked ?? false;
|
||||
|
||||
//InfosysUpdate
|
||||
//v&H6c$wTbTkgSgdWvL*8k$st3#z5X
|
||||
var error = "";
|
||||
@@ -417,7 +420,7 @@ namespace InfosysPublisher
|
||||
File.Delete(tmpXmlFile);
|
||||
}
|
||||
|
||||
if (xmlVersion != "")
|
||||
if (publishToAll && xmlVersion != "")
|
||||
{
|
||||
var projectArchive = sftpServer.SftpArchivePath + "/" + _selectedProjectPublishLocation;
|
||||
if (!sftpClient.Exists(projectArchive))
|
||||
@@ -455,11 +458,15 @@ namespace InfosysPublisher
|
||||
var genPublishLocation = _selectedProjectPublishLocation + "/" + "Package.zip";
|
||||
var genPublishLocationTmp = _selectedProjectPublishLocation + "/" + "Package_tmp.zip";
|
||||
|
||||
if (publishToAll)
|
||||
{
|
||||
using (var fileStream = new FileStream(zipPath, FileMode.Open))
|
||||
{
|
||||
sftpClient.UploadFile(fileStream, genPublishLocationTmp,
|
||||
true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var sftpDirVersion = _selectedProjectPublishLocation + "/" + _selectedProjectVersion;
|
||||
|
||||
@@ -475,18 +482,21 @@ namespace InfosysPublisher
|
||||
true);
|
||||
}
|
||||
|
||||
if (sftpClient.Exists(genPublishLocation))
|
||||
if (publishToAll && sftpClient.Exists(genPublishLocation))
|
||||
sftpClient.DeleteFile(genPublishLocation);
|
||||
|
||||
if (sftpClient.Exists(versionPublishLocation))
|
||||
sftpClient.DeleteFile(versionPublishLocation);
|
||||
|
||||
if (publishToAll)
|
||||
sftpClient.RenameFile(genPublishLocationTmp, genPublishLocation);
|
||||
|
||||
sftpClient.RenameFile(versionPublishLocationTmp, versionPublishLocation);
|
||||
|
||||
//XML na koncu
|
||||
using (var fileStream = new FileStream(tmpXmlFileUpload, FileMode.Open))
|
||||
if (publishToAll)
|
||||
{
|
||||
using var fileStream = new FileStream(tmpXmlFileUpload, FileMode.Open);
|
||||
sftpClient.UploadFile(fileStream, _selectedProjectPublishLocation + "/" + "Update.xml",
|
||||
true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user