Обновить библиотеку, читалку и выпуск до 2.31

This commit is contained in:
Курнат Андрей
2026-07-17 14:38:49 +03:00
parent 2f40569031
commit c880395341
188 changed files with 15734 additions and 3702 deletions
+10 -8
View File
@@ -171,14 +171,10 @@ function Get-ArgusTemplate {
function Resolve-PackageFileName {
param(
[string]$Version,
[object]$Template
[long]$VersionCode
)
if ($Template -and $Template.packageFile -and ($Template.packageFile -match "^(?<base>.+)-\d[\w\.\-]*(?<ext>\.apk)$")) {
return "$($matches.base)-$Version$($matches.ext)"
}
return "aletheia-$Version.apk"
return "aletheia-$Version-$VersionCode.apk"
}
function Resolve-KeystoreInfoPath {
@@ -296,6 +292,10 @@ $versionName = [string]$releaseElement.versionName
if ([string]::IsNullOrWhiteSpace($versionName)) {
throw "versionName is empty in release output metadata."
}
$versionCode = [long]$releaseElement.versionCode
if ($versionCode -le 0) {
throw "versionCode must be positive in release output metadata."
}
$unsignedApk = Join-Path $projectRoot ("app\build\outputs\apk\release\" + $releaseElement.outputFile)
if (-not (Test-Path -LiteralPath $unsignedApk)) {
@@ -312,7 +312,7 @@ $keystorePath = Resolve-KeystorePath -ConfiguredPath $keystoreInfo["KeystorePath
$template = Get-ArgusTemplate -ProjectRoot $projectRoot
$slug = if ($template -and $template.slug) { [string]$template.slug } else { "aletheia-kotlin" }
$packageFile = Resolve-PackageFileName -Version $versionName -Template $template
$packageFile = Resolve-PackageFileName -Version $versionName -VersionCode $versionCode
$outputDir = Join-Path $projectRoot ("artifacts\argus\$slug\$versionName")
$alignedApk = Join-Path $outputDir ([IO.Path]::GetFileNameWithoutExtension($packageFile) + "-aligned.apk")
$signedApk = Join-Path $outputDir $packageFile
@@ -413,7 +413,9 @@ $manifest = [ordered]@{
platform = if ($template -and $template.platform) { $template.platform } else { "android" }
packageKind = if ($template -and $template.packageKind) { $template.packageKind } else { "apk" }
releaseNotes = $releaseNotesText
publicCatalog = if ($template -and $null -ne $template.publicCatalog) { [bool]$template.publicCatalog } else { $false }
# The updater reads the public manifest endpoint. An unlisted app returns 404 there,
# so Aletheia releases must stay visible to the public Argus API.
publicCatalog = $true
packageFile = $packageFile
packageSha256 = $packageSha256
signerInfo = ($signerInfo.TrimEnd() -replace "\r?\n", [Environment]::NewLine)
+3 -2
View File
@@ -1,8 +1,8 @@
param(
[string]$ManifestPath,
[string]$SshHost = "192.168.0.185",
[string]$SshHost = "192.168.0.25",
[string]$SshUser = "sevenhill",
[string]$ArgusDataPath = "/srv/argus-data",
[string]$ArgusDataPath = "/opt/argus/data",
[switch]$RestartArgus
)
@@ -309,6 +309,7 @@ $remoteScriptLines = @(
"export ARGUS_PLATFORM=$(ConvertTo-BashSingleQuoted $platform)",
"export ARGUS_PACKAGE_KIND=$(ConvertTo-BashSingleQuoted $packageKind)",
"export ARGUS_NOTES=$(ConvertTo-BashSingleQuoted $releaseNotes)",
'trap ''rm -f -- "$SOURCE_FILE"'' EXIT',
'python3 - "$SOURCE_FILE" <<''PY''',
$pythonBlock,
"PY",