fix(build): cleanly terminate all mcp binaries on deploy and supply bearer token to shutdown
This commit is contained in:
1 parent
d8285a41c7
commit
9b9b403ef2
1 file changed
+2
-2
@@ -7,9 +7,9 @@ deploy-all: deploy-win deploy-wsl
|
|||||||
# Gracefully shut down the running server
|
# Gracefully shut down the running server
|
||||||
shutdown-server:
|
shutdown-server:
|
||||||
Write-Host "Shutting down MCP server gracefully..." -ForegroundColor Cyan
|
Write-Host "Shutting down MCP server gracefully..." -ForegroundColor Cyan
|
||||||
-Invoke-RestMethod -Uri "http://127.0.0.1:3000/shutdown" -Method Post -ErrorAction SilentlyContinue
|
-$token = Get-Content "$env:USERPROFILE\.gemini\mcp_memory\admin.token" -ErrorAction SilentlyContinue; if ($token) { Invoke-RestMethod -Uri "http://127.0.0.1:3000/shutdown" -Method Post -Headers @{ Authorization = "Bearer $token" } -ErrorAction SilentlyContinue } else { Invoke-RestMethod -Uri "http://127.0.0.1:3000/shutdown" -Method Post -ErrorAction SilentlyContinue }
|
||||||
Start-Sleep -Seconds 1
|
Start-Sleep -Seconds 1
|
||||||
if (Get-Process mcp-memory-server -ErrorAction SilentlyContinue) { Stop-Process -Name mcp-memory-server -Force -ErrorAction SilentlyContinue }
|
-if (Get-Process mcp-memory-server, mcp-memory-stub, mcp-memory-win-nvim -ErrorAction SilentlyContinue) { Stop-Process -Name mcp-memory-server, mcp-memory-stub, mcp-memory-win-nvim -Force -ErrorAction SilentlyContinue }
|
||||||
|
|
||||||
# Build and deploy Windows-native binaries
|
# Build and deploy Windows-native binaries
|
||||||
deploy-win: shutdown-server
|
deploy-win: shutdown-server
|
||||||
|
|||||||
Reference in new issue
Block a user