From 55c2636db94f8d207d41e1361c22c76d40464214 Mon Sep 17 00:00:00 2001 From: Riz Ashraf Date: Mon, 5 Oct 2026 10:22:12 +0100 Subject: [PATCH] feat(cli): add just version recipe for double-lock cross-checking --- justfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 13f5802..f11d109 100644 --- a/justfile +++ b/justfile @@ -46,6 +46,13 @@ start port="3000": verify port="3000": .\verify_deployment.ps1 -Port {{port}} +# Display active running version and binary CLI version details +version port="3000": + @Write-Host "--- Running Server API Version ---" -ForegroundColor Cyan + -& { try { $h = Invoke-RestMethod -Uri "http://127.0.0.1:{{port}}/health" -ErrorAction Stop; Write-Host "HTTP /health: $($h.version.app_version) [$($h.version.target_os)/$($h.version.target_arch)]" -ForegroundColor Green } catch { Write-Host "HTTP /health: Server not reachable on port {{port}}" -ForegroundColor Yellow } } + @Write-Host "--- Deployed Binary CLI Version ---" -ForegroundColor Cyan + -mcp-memory-server --version + # Restart the server and verify restart port="3000": (stop port) (start port) (verify port) @@ -69,8 +76,7 @@ deploy-server: @Write-Host "Deploying Windows Server..." -ForegroundColor Cyan -Stop-Process -Name mcp-memory-server -Force -ErrorAction SilentlyContinue Start-Sleep -Seconds 1 - -if (Test-Path "C:\Users\reazul.ashraf\.local\bin\mcp-memory-server.exe") { Move-Item -Force "C:\Users\reazul.ashraf\.local\bin\mcp-memory-server.exe" "C:\Users\reazul.ashraf\.local\bin\mcp-memory-server.exe.old" -ErrorAction SilentlyContinue; Remove-Item -Force "C:\Users\reazul.ashraf\.local\bin\mcp-memory-server.exe.old" -ErrorAction SilentlyContinue } - Copy-Item -Force target\release\mcp-memory-server.exe "C:\Users\reazul.ashraf\.local\bin\" + -& { $targets = @("$env:USERPROFILE\.local\bin\mcp-memory-server.exe", "$env:USERPROFILE\.cargo\bin\mcp-memory-server.exe"); foreach ($target in $targets) { if (Test-Path (Split-Path $target)) { if (Test-Path $target) { $bak = "$target.old.$([guid]::NewGuid().ToString().Substring(0,8))"; Move-Item -Force $target $bak -ErrorAction SilentlyContinue }; Copy-Item -Force target\release\mcp-memory-server.exe $target; Get-ChildItem "$(Split-Path $target)\mcp-memory-server.exe.old.*" -ErrorAction SilentlyContinue | Remove-Item -Force -ErrorAction SilentlyContinue } } } deploy-stub-win: