xetup/web/get.ps1
X9 Dev 82349dbe31 Add install command box and fix Forgejo API proxy on landing page
- nginx.conf: add /forgejo-api/ proxy location to xetup-forgejo:3000
- index.html: add install command box (irm xetup.x9.cz/get.ps1 | iex)
  with one-click copy button; remove broken API token from JS
- get.ps1: PowerShell installer that fetches latest release URL and runs exe

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 11:28:28 +02:00

18 lines
714 B
PowerShell

# xetup installer - downloads and launches the latest release
# Usage: irm xetup.x9.cz/get.ps1 | iex
$api = 'https://xetup.x9.cz/forgejo-api/repos/x9/xetup/releases?limit=1'
try {
$rel = (Invoke-RestMethod -Uri $api -UseBasicParsing)[0]
$asset = $rel.assets | Where-Object { $_.name -eq 'xetup.exe' } | Select-Object -First 1
if (-not $asset) { Write-Error "xetup.exe not found in latest release"; exit 1 }
$out = "$env:TEMP\xetup.exe"
Write-Host "Downloading xetup $($rel.tag_name)..."
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $out -UseBasicParsing
Write-Host "Launching..."
Start-Process -FilePath $out -Verb RunAs
} catch {
Write-Error "Failed: $_"
}