From 429f41d853e8f7799911f39f0cc0afaf3a7d5320 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Wed, 18 Mar 2026 03:37:30 -0400 Subject: [PATCH] fix: auto-patch tauri.conf.json version from git tag in CI Never manually sync version again. CI reads the tag, patches the config before building. Also bumped to 1.1.5. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build-release.yml | 9 +++++++++ src-tauri/tauri.conf.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-release.yml b/.gitea/workflows/build-release.yml index 8942062..bb496dd 100644 --- a/.gitea/workflows/build-release.yml +++ b/.gitea/workflows/build-release.yml @@ -39,6 +39,15 @@ jobs: cargo --version java --version + - name: Patch version from git tag + shell: powershell + run: | + $ver = ("${{ github.ref_name }}" -replace '^v','') + $conf = Get-Content src-tauri\tauri.conf.json -Raw + $conf = $conf -replace '"version":\s*"[^"]*"', "`"version`": `"$ver`"" + [System.IO.File]::WriteAllText((Join-Path (Get-Location) "src-tauri\tauri.conf.json"), $conf) + Write-Host "Patched tauri.conf.json version to $ver" + - name: Install dependencies and build frontend shell: powershell run: | diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6725a43..71cf595 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "productName": "Wraith", - "version": "1.1.0", + "version": "1.1.5", "identifier": "com.vigilcyber.wraith", "build": { "frontendDist": "../dist",