Prepare Pro 1.0.1 imports and license tooling

This commit is contained in:
livio committed 2026-09-28 19:41:57 +02:00
1 parent 62f28c5621
commit 0b5017739c
13 files changed
+437 -48

No files matched your search

+14 -2
View File
@@ -11,6 +11,12 @@ $signingDirectory = Join-Path $env:LOCALAPPDATA "LME\Signing"
$keyStore = Join-Path $signingDirectory "lme-pro-test.keystore"
$passwordFile = Join-Path $signingDirectory "lme-pro-test-password.dpapi"
$outputDirectory = Join-Path $projectRoot "artifacts\android-test"
$projectPath = Join-Path $projectRoot "LMEMappeCatastaliApp.csproj"
[xml]$projectXml = Get-Content -Raw -LiteralPath $projectPath
$appVersion = ($projectXml.Project.PropertyGroup | Where-Object ApplicationDisplayVersion | Select-Object -First 1).ApplicationDisplayVersion
if ([string]::IsNullOrWhiteSpace($appVersion)) {
throw "ApplicationDisplayVersion non trovata nel progetto."
}
foreach ($requiredPath in @($dotnet, $keytool, $androidSdk)) {
if (-not (Test-Path -LiteralPath $requiredPath)) {
@@ -50,7 +56,7 @@ $env:LME_ANDROID_TEST_KEY_PASS = $plainPassword
$copiedPackages = [System.Collections.Generic.List[System.IO.FileInfo]]::new()
try {
foreach ($format in @("apk", "aab")) {
& $dotnet publish (Join-Path $projectRoot "LMEMappeCatastaliApp.csproj") `
& $dotnet publish $projectPath `
-f net10.0-android `
-c $Configuration `
-p:AndroidSdkDirectory=$androidSdk `
@@ -72,7 +78,7 @@ try {
throw "Nessun pacchetto $format firmato prodotto in $publishDirectory"
}
$destination = Join-Path $outputDirectory "LME-Mappe-Catastali-Pro-1.0.0-test.$format"
$destination = Join-Path $outputDirectory "LME-Mappe-Catastali-Pro-$appVersion-test.$format"
Copy-Item -LiteralPath $package.FullName -Destination $destination -Force
$copiedPackages.Add((Get-Item -LiteralPath $destination))
}
@@ -89,6 +95,12 @@ $filesToHash = @($copiedPackages)
if (Test-Path -LiteralPath $licenseManagerArchive) {
$filesToHash += Get-Item -LiteralPath $licenseManagerArchive
}
$publicKeySource = Join-Path $projectRoot "tools\LmeLicenseManager\manual-license-public.pem"
if (Test-Path -LiteralPath $publicKeySource) {
$publicKeyDestination = Join-Path $outputDirectory "manual-license-public.pem"
Copy-Item -LiteralPath $publicKeySource -Destination $publicKeyDestination -Force
$filesToHash += Get-Item -LiteralPath $publicKeyDestination
}
$hashLines = $filesToHash | ForEach-Object {
$hash = Get-FileHash -Algorithm SHA256 -LiteralPath $_.FullName