publis samo v verzjo
This commit is contained in:
@@ -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,12 +458,16 @@ namespace InfosysPublisher
|
||||
var genPublishLocation = _selectedProjectPublishLocation + "/" + "Package.zip";
|
||||
var genPublishLocationTmp = _selectedProjectPublishLocation + "/" + "Package_tmp.zip";
|
||||
|
||||
using (var fileStream = new FileStream(zipPath, FileMode.Open))
|
||||
if (publishToAll)
|
||||
{
|
||||
sftpClient.UploadFile(fileStream, genPublishLocationTmp,
|
||||
true);
|
||||
using (var fileStream = new FileStream(zipPath, FileMode.Open))
|
||||
{
|
||||
sftpClient.UploadFile(fileStream, genPublishLocationTmp,
|
||||
true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var sftpDirVersion = _selectedProjectPublishLocation + "/" + _selectedProjectVersion;
|
||||
|
||||
if (!sftpClient.Exists(sftpDirVersion))
|
||||
@@ -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);
|
||||
|
||||
sftpClient.RenameFile(genPublishLocationTmp, genPublishLocation);
|
||||
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