fix: resolve latest release dynamically in installers (was hardcoded v0.2.0)
CI / Lint (push) Failing after 9m35s
CI / Test (push) Failing after 6m4s
CI / Build (darwin/amd64) (push) Skipped
CI / Build (linux/amd64) (push) Skipped
CI / Build (windows/amd64) (push) Skipped
CI / Build (darwin/arm64) (push) Skipped
CI / Build (linux/arm64) (push) Skipped
CI / Build (windows/arm64) (push) Skipped
CI / Release (push) Skipped

This commit is contained in:
2026-08-14 11:32:19 -04:00
parent 919c6f0040
commit 52823109bc
2 changed files with 33 additions and 2 deletions
+14 -1
View File
@@ -8,8 +8,21 @@
$ErrorActionPreference = 'Stop'
$Version = if ($env:CLIP_SYNC_VERSION) { $env:CLIP_SYNC_VERSION } else { 'v0.2.0' }
$Version = if ($env:CLIP_SYNC_VERSION) { $env:CLIP_SYNC_VERSION } else { 'latest' }
$Repo = 'https://git.dracodev.net/Projets/clip-sync'
$ApiBase = 'https://git.dracodev.net/api/v1/repos/Projets/clip-sync'
# ── Resolve version ───────────────────────────────────────────────────
if ($Version -eq 'latest') {
try {
$release = Invoke-RestMethod "$ApiBase/releases/latest" -UseBasicParsing
$Version = $release.tag_name
if (-not $Version) { throw 'no tag_name' }
} catch {
throw "clip-sync: no release found. Publish one (git tag v0.2.0 && git push origin v0.2.0), or build from source: git clone $Repo && cd clip-sync && make install"
}
}
# ── Detect architecture ───────────────────────────────────────────────