feat(ota & web): integrate automated portable/source zip upload and web showcase synchronization into publish.ps1
This commit is contained in:
parent
f7371eac3f
commit
55e0ec099f
1 changed files with 39 additions and 0 deletions
39
publish.ps1
39
publish.ps1
|
|
@ -55,6 +55,32 @@ if (-not $UploadOnly) {
|
|||
Write-Host "[UYARI] Standart tauri build sonlandı, çıktılar kontrol ediliyor..." -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Portable & Kaynak ZIP Üretimi
|
||||
Write-Host " -> Taşınabilir (Portable ZIP) ve Kaynak ZIP paketleniyor..." -ForegroundColor Gray
|
||||
$tempPortable = Join-Path $ScriptDir "dist_server\portable_staging"
|
||||
if (Test-Path $tempPortable) { Remove-Item $tempPortable -Recurse -Force }
|
||||
New-Item -ItemType Directory -Path $tempPortable -Force | Out-Null
|
||||
|
||||
$releaseExe = "C:\Users\lildosto\ld_target\release\ld_uninstaller.exe"
|
||||
if (-not (Test-Path $releaseExe)) {
|
||||
$releaseExe = "$ScriptDir\src-tauri\target\release\ld_uninstaller.exe"
|
||||
}
|
||||
if (Test-Path $releaseExe) {
|
||||
Copy-Item $releaseExe -Destination "$tempPortable\LD Uninstaller.exe"
|
||||
$w2l = Join-Path (Split-Path $releaseExe) "WebView2Loader.dll"
|
||||
if (Test-Path $w2l) {
|
||||
Copy-Item $w2l -Destination "$tempPortable\WebView2Loader.dll"
|
||||
}
|
||||
$portableZip = Join-Path $DistServerDir "LD-Uninstaller-v${Version}-portable.zip"
|
||||
if (Test-Path $portableZip) { Remove-Item $portableZip -Force }
|
||||
Compress-Archive -Path "$tempPortable\*" -DestinationPath $portableZip -CompressionLevel Optimal
|
||||
}
|
||||
Remove-Item $tempPortable -Recurse -Force -ErrorAction SilentlyContinue
|
||||
|
||||
$sourceZip = Join-Path $DistServerDir "ld-uninstaller-source.zip"
|
||||
if (Test-Path $sourceZip) { Remove-Item $sourceZip -Force }
|
||||
git archive --format=zip --output=$sourceZip HEAD 2>$null
|
||||
|
||||
# 3. Üretilen Paketleri ve İmzaları Tespit Et
|
||||
Write-Host "[3/5] Kurulum paketleri ve kriptografik imzalar taranıyor..." -ForegroundColor Yellow
|
||||
|
||||
|
|
@ -202,6 +228,19 @@ try {
|
|||
scp -i $SSHKey -o ConnectTimeout=15 "$DistServerDir\LD-Uninstaller_${Version}_x64-setup.exe" root@${ServerIP}:${RemoteDownloadsDir}/LD-Uninstaller-Setup-v${Version}.exe
|
||||
scp -i $SSHKey -o ConnectTimeout=15 "$DistServerDir\LD-Uninstaller_${Version}_x64-setup.exe" root@${ServerIP}:${RemoteDownloadsDir}/LD-Uninstaller-Setup-latest.exe
|
||||
|
||||
$portableUpload = Join-Path $DistServerDir "LD-Uninstaller-v${Version}-portable.zip"
|
||||
if (Test-Path $portableUpload) {
|
||||
scp -i $SSHKey -o ConnectTimeout=15 $portableUpload root@${ServerIP}:${RemoteDownloadsDir}/
|
||||
}
|
||||
$sourceUpload = Join-Path $DistServerDir "ld-uninstaller-source.zip"
|
||||
if (Test-Path $sourceUpload) {
|
||||
scp -i $SSHKey -o ConnectTimeout=15 $sourceUpload root@${ServerIP}:${RemoteDownloadsDir}/
|
||||
}
|
||||
$readmeUpload = Join-Path $DistServerDir "ld-uninstaller-README.md"
|
||||
if (Test-Path $readmeUpload) {
|
||||
scp -i $SSHKey -o ConnectTimeout=15 $readmeUpload root@${ServerIP}:${RemoteDownloadsDir}/readmes/ld-uninstaller-README.md
|
||||
}
|
||||
|
||||
ssh -i $SSHKey -o ConnectTimeout=5 root@$ServerIP "chmod -R 755 $RemoteDir; docker restart tylorindar-safelink-hub >/dev/null 2>&1"
|
||||
|
||||
Write-Host "`n[BAŞARILI] Sürüm v$Version kendi web sitene başarıyla yayınlandı!" -ForegroundColor Green
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue