Some checks are pending
CI / Integration (mcr.microsoft.com/mssql/server:2017-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2019-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2022-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2025-latest) (push) Blocked by required conditions
CI / Build og unit tests (push) Successful in 57s
deploy community / deploy (push) Successful in 1s
CI / MSI-installer (push) Successful in 38s
Forgejo 10 has no releases/latest/download/ URL, so the versionless second copy of the MSI in each release was useless. Releases now carry the MSI once; get-latest-msi.ps1 finds it through GET /releases/latest (no login). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
21 lines
876 B
PowerShell
21 lines
876 B
PowerShell
<#
|
|
.SYNOPSIS
|
|
Henter den nyeste SQLInsight Pro-MSI fra Forgejo-releases (ingen login kræves).
|
|
.EXAMPLE
|
|
.\installer\get-latest-msi.ps1 # gemmer i den aktuelle mappe
|
|
.\installer\get-latest-msi.ps1 -OutDir C:\Temp
|
|
#>
|
|
param(
|
|
[string]$OutDir = (Get-Location).Path,
|
|
[string]$Repo = 'https://git.seosoft.dk/api/v1/repos/seo/sqlinsight-pro'
|
|
)
|
|
$ErrorActionPreference = 'Stop'
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
|
|
$release = Invoke-RestMethod "$Repo/releases/latest"
|
|
$asset = $release.assets | Where-Object name -like 'SQLInsight-Pro-*-x64.msi' | Select-Object -First 1
|
|
if (-not $asset) { throw "Releasen $($release.tag_name) har ingen MSI." }
|
|
|
|
$target = Join-Path $OutDir $asset.name
|
|
Invoke-WebRequest $asset.browser_download_url -OutFile $target -UseBasicParsing
|
|
Write-Output "$($release.name): $target"
|