57 lines
2.9 KiB
Makefile
57 lines
2.9 KiB
Makefile
set shell := ["pwsh.exe", "-NoProfile", "-c"]
|
|
|
|
default:
|
|
@just --list
|
|
|
|
# Build and deploy everything across Windows and WSL
|
|
all: build-all deploy-all
|
|
|
|
# Build everything across Windows and WSL
|
|
build-all: build-win build-wsl
|
|
Write-Host "Build complete across both OS boundaries." -ForegroundColor Green
|
|
|
|
# Deploy everything across Windows and WSL
|
|
deploy-all: deploy-win deploy-wsl
|
|
Write-Host "Deployment complete across both OS boundaries." -ForegroundColor Green
|
|
|
|
# Gracefully shut down the running server
|
|
shutdown-server:
|
|
Write-Host "Shutting down MCP server gracefully..." -ForegroundColor Cyan
|
|
-$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
|
|
-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 Windows-native binaries
|
|
build-win:
|
|
Write-Host "Building Windows binaries..." -ForegroundColor Cyan
|
|
cargo build --release -p mcp-memory-server -p mcp-memory-stub -p mcp-memory-win-nvim
|
|
|
|
# Deploy Windows-native binaries
|
|
deploy-win: shutdown-server
|
|
Write-Host "Deploying Windows binaries..." -ForegroundColor Cyan
|
|
Copy-Item -Force target\release\mcp-memory-stub.exe "C:\Users\reazul.ashraf\.local\bin\"; Copy-Item -Force target\release\mcp-memory-win-nvim.exe "C:\Users\reazul.ashraf\.local\bin\"
|
|
Copy-Item -Force target\release\mcp-memory-server.exe "C:\Users\reazul.ashraf\.local\bin\"
|
|
|
|
# Build WSL-native binaries
|
|
build-wsl:
|
|
Write-Host "Building WSL binaries natively..." -ForegroundColor Cyan
|
|
wsl.exe -d Ubuntu -e bash -c 'export PATH="$PATH:/home/riz/.cargo/bin" && cd /mnt/c/Users/reazul.ashraf/workspace/rust/mcp-memory && cargo build --release -p mcp-memory-stub -p mcp-memory-linux-nvim'
|
|
|
|
# Deploy WSL-native binaries
|
|
deploy-wsl:
|
|
Write-Host "Deploying WSL binaries natively..." -ForegroundColor Cyan
|
|
wsl.exe -d Ubuntu -e bash -c 'export PATH="$PATH:/home/riz/.cargo/bin" && cd /mnt/c/Users/reazul.ashraf/workspace/rust/mcp-memory && cp target/release/mcp-memory-stub /home/riz/.local/bin/ && cp target/release/mcp-memory-linux-nvim /home/riz/.local/bin/'
|
|
|
|
# Run configuration tests to ensure eagerTools parity
|
|
test-config:
|
|
cargo test --release -p mcp-memory-server --test parity_test
|
|
|
|
# Run tests and generate code coverage report
|
|
test-coverage:
|
|
@Write-Host "Running tests with code coverage..." -ForegroundColor Cyan
|
|
rustup run stable cargo llvm-cov --workspace
|
|
|
|
# Start the server directly
|
|
startup-server:
|
|
cargo run -p mcp-memory-server
|