Обновить библиотеку, читалку и выпуск до 2.31
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user