feat: versioning, feat: in app configueration, feat: single exe, feat: reasoning, action: inital version, fix: config saving
Build Release EXE / build-windows-exe (release) Successful in 1m5s

This commit is contained in:
2026-05-06 15:06:15 -04:00
parent da016c23cb
commit 11adcc160a
19 changed files with 1926 additions and 24 deletions
+29
View File
@@ -0,0 +1,29 @@
param(
[Parameter(Mandatory = $true)]
[ValidatePattern('^v?\d+\.\d+\.\d+([-.+][0-9A-Za-z.-]+)?$')]
[string]$Version
)
$ErrorActionPreference = "Stop"
$repoRoot = Resolve-Path -LiteralPath (Join-Path $PSScriptRoot "..")
$cleanVersion = $Version.TrimStart("v")
$pyprojectPath = Join-Path $repoRoot "pyproject.toml"
$versionPath = Join-Path $repoRoot "traderai\version.py"
$lockPath = Join-Path $repoRoot "uv.lock"
$pyproject = Get-Content -LiteralPath $pyprojectPath -Raw
$pyproject = $pyproject -replace '(?m)^version = "[^"]+"', "version = `"$cleanVersion`""
Set-Content -LiteralPath $pyprojectPath -Value $pyproject -Encoding UTF8
$versionModule = Get-Content -LiteralPath $versionPath -Raw
$versionModule = $versionModule -replace '__version__ = "[^"]+"', "__version__ = `"$cleanVersion`""
Set-Content -LiteralPath $versionPath -Value $versionModule -Encoding UTF8
if (Test-Path -LiteralPath $lockPath) {
$lock = Get-Content -LiteralPath $lockPath -Raw
$lock = $lock -replace '(?s)(name = "traderai"\s+version = ")[^"]+(")', "`${1}$cleanVersion`${2}"
Set-Content -LiteralPath $lockPath -Value $lock -Encoding UTF8
}
Write-Host "TraderAI version set to $cleanVersion"