chore(release): point updater feed at updates.mailib.ru (v1.0.16)
Set build.publish.url to the production HTTPS feed, bump version to 1.0.16, add publish-to-updates.ps1 for VPS upload, and normalize Linux AppImage names from x86_64 to x64 after pack:linux. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Заливка релиза на https://updates.mailib.ru/ (nginx root: /var/www/updates_mailib_ru)
|
||||
# Использование:
|
||||
# 1) Положите артефакты в $LocalDir (или соберите pack:win и скопируйте из release\)
|
||||
# 2) powershell -ExecutionPolicy Bypass -File scripts\publish-to-updates.ps1
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$Key = "$env:USERPROFILE\.ssh\ttrpg_updates_root"
|
||||
$LocalDir = 'D:\TTRPG-Release'
|
||||
$SshTarget = 'root@185.173.94.234'
|
||||
$RemoteDir = '/var/www/updates_mailib_ru'
|
||||
|
||||
if (-not (Test-Path $Key)) {
|
||||
Write-Error "SSH key not found: $Key"
|
||||
}
|
||||
if (-not (Test-Path $LocalDir)) {
|
||||
Write-Error "Local release folder not found: $LocalDir"
|
||||
}
|
||||
|
||||
$patterns = @(
|
||||
'latest.yml',
|
||||
'latest-linux*.yml',
|
||||
'latest-mac.yml',
|
||||
'TTRPGPlayer-Setup.exe',
|
||||
'TTRPGPlayer-Setup.exe.blockmap',
|
||||
'TTRPGPlayer-x64.AppImage',
|
||||
'TTRPGPlayer-x86_64.AppImage',
|
||||
'TTRPGPlayer-arm64.AppImage',
|
||||
'TTRPGPlayer-x64.dmg',
|
||||
'TTRPGPlayer-arm64.dmg'
|
||||
)
|
||||
|
||||
$files = @()
|
||||
foreach ($pat in $patterns) {
|
||||
$files += Get-ChildItem -Path $LocalDir -Filter $pat -File -ErrorAction SilentlyContinue
|
||||
}
|
||||
$files = $files | Sort-Object -Property Name -Unique
|
||||
|
||||
if (-not $files) {
|
||||
Write-Error "No release files matched in $LocalDir"
|
||||
}
|
||||
|
||||
Write-Host "Uploading to ${SshTarget}:${RemoteDir}"
|
||||
foreach ($f in $files) {
|
||||
Write-Host " -> $($f.Name)"
|
||||
& scp -i $Key $f.FullName "${SshTarget}:${RemoteDir}/"
|
||||
}
|
||||
|
||||
& ssh -i $Key $SshTarget "chown -R www-data:www-data $RemoteDir && ls -la $RemoteDir"
|
||||
|
||||
Write-Host ''
|
||||
Write-Host 'Verify:'
|
||||
Write-Host ' curl https://updates.mailib.ru/latest.yml'
|
||||
Reference in New Issue
Block a user