Update post-build x versione Transfer
This commit is contained in:
@@ -4,4 +4,8 @@
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
+51
-1
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -28,6 +30,54 @@ namespace Core
|
||||
public string MasterKey { get; set; } = "";
|
||||
public string ReqBody { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Istanzia un nuovo ogetto richeista supporto
|
||||
/// </summary>
|
||||
/// <param name="codApp">Codice Applicazione (es EBW-UP)</param>
|
||||
/// <param name="codImp">Codice Impegno (es codice chiave HW)</param>
|
||||
/// <param name="codInst">Codice Cliente/Installazione</param>
|
||||
/// <param name="contactEmail">Email x contatto</param>
|
||||
/// <param name="contactName">Nome del richiedente/clietne</param>
|
||||
/// <param name="contactPhone">Tel richeidente/cliente</param>
|
||||
/// <param name="masterKey">Chiave master di comunicazione da LiMan</param>
|
||||
/// <param name="ReqBody">Testo delal richiesta</param>
|
||||
/// <param name="idxSubLic">Idx univoco di sublic (es x gestione utenti)</param>
|
||||
/// <param name="tipo">tipo ticket da gestire (default fileUpload)</param>
|
||||
public SupportRequest(string codApp, string codImp, string codInst, string contactEmail, string contactName, string contactPhone, string masterKey, string ReqBody, int idxSubLic = 0, TipologiaTicket tipo = TipologiaTicket.FileUpload)
|
||||
{
|
||||
this.CodApp = CodApp;
|
||||
this.CodImp = CodImp;
|
||||
this.CodInst = CodInst;
|
||||
this.ContactEmail = contactEmail;
|
||||
this.ContactName = contactName;
|
||||
this.ContactPhone = contactPhone;
|
||||
this.MasterKey = masterKey;
|
||||
this.ReqBody = ReqBody;
|
||||
this.idxSubLic = idxSubLic;
|
||||
this.Tipo = tipo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua salvataggio su file di un oggetto richiesta file upload
|
||||
/// </summary>
|
||||
/// <param name="currReq">Oggetto richiesta (già istanziato)</param>
|
||||
/// <param name="filePath">Path dove salvare il file</param>
|
||||
public static bool SaveRequest(SupportRequest currReq, string filePath)
|
||||
{
|
||||
bool fatto = false;
|
||||
try
|
||||
{
|
||||
string rawData = JsonConvert.SerializeObject(currReq, Formatting.Indented);
|
||||
File.WriteAllText(filePath, rawData);
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.Write(ex.ToString());
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -26,5 +26,7 @@
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
$FileMajMin = "..\MajMin.vers"
|
||||
$FileVers = "Resources\VersNum.txt"
|
||||
$FileManIn = "Resources\manifest-original.xml"
|
||||
$FileManOut = "Resources\manifest.xml"
|
||||
$FileCLogIn = "Resources\ChangeLog-original.html"
|
||||
$FileCLogOut = "Resources\ChangeLog.html"
|
||||
$MajMin = Get-Content $FileMajMin # "6.14."
|
||||
$currentDate = get-date -format yyMM;
|
||||
$currentTime = get-date -format ddHH;
|
||||
$find = "<Version>(.|\n)*?</Version>";
|
||||
$currRelNum = $MajMin + $currentDate +"." + $currentTime
|
||||
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
|
||||
$csproj = Get-Content $ProjectPath
|
||||
$csprojUpdated = $csproj -replace $find, $replace
|
||||
|
||||
Set-Content -Path $ProjectPath -Value $csprojUpdated
|
||||
Set-Content -Path $FileVers -Value $currRelNum
|
||||
|
||||
# replace x manifest
|
||||
$manData = Get-Content $FileManIn
|
||||
$manData = $manData -replace "1.0.0.0", $currRelNum
|
||||
$manData = $manData -replace "{{DIRNAME}}", "LiMan"
|
||||
$manData = $manData -replace "{{BRANCHNAME}}", "stable/LAST"
|
||||
$manData = $manData -replace "{{PACKNAME}}", "LiMan.Transfer"
|
||||
Set-Content -Path $FileManOut -Value $manData
|
||||
|
||||
# replace x ChangeLog
|
||||
$clogData = Get-Content $FileCLogIn
|
||||
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
|
||||
Set-Content -Path $FileCLogOut -Value $clogData
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.1.2202.0711</Version>
|
||||
<Version>1.1.2202.0712</Version>
|
||||
<RootNamespace>LiMan.UI</RootNamespace>
|
||||
<AssemblyName>LiMan.UI</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2202.0711</h4>
|
||||
<h4>Versione: 1.1.2202.0712</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2202.0711
|
||||
1.1.2202.0712
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2202.0711</version>
|
||||
<version>1.1.2202.0712</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user