fix(deploy): update deploy-server recipe with error suppression for locks

This commit is contained in:
Riz Ashraf committed 2026-10-02 07:27:21 +01:00
1 parent 462f65f66d
commit 74ca0948c9
1 file changed
+22 -9
+22 -9
View File
@@ -67,11 +67,9 @@ build-stub-win:
# =========================================================
# 3. DEPLOY (Move Binaries to Global Path)
# =========================================================
# WARNING: Deploy recipes DO NOT stop running processes.
# You MUST stop the server/process before deploying to avoid file lock errors.
deploy-server:
@Write-Host "Deploying Windows Server..." -ForegroundColor Cyan
-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\"
@@ -99,32 +97,42 @@ deploy-wsl: deploy-stub deploy-nvim deploy-rules-wsl
build-stub:
@Write-Host "Building WSL Stub 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'
wsl.exe -d Ubuntu -e bash -c 'export PATH="/home/riz/.cargo/bin:$PATH" && cd /mnt/c/Users/reazul.ashraf/workspace/rust/mcp-memory && cargo build --release -p mcp-memory-stub'
deploy-stub:
@Write-Host "Deploying WSL Stub 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/'
wsl.exe -d Ubuntu -e bash -c 'export PATH="/home/riz/.cargo/bin:$PATH" && cd /mnt/c/Users/reazul.ashraf/workspace/rust/mcp-memory && cp target/release/mcp-memory-stub /home/riz/.local/bin/'
build-nvim:
@Write-Host "Building WSL Nvim 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-linux-nvim'
wsl.exe -d Ubuntu -e bash -c 'export PATH="/home/riz/.cargo/bin:$PATH" && cd /mnt/c/Users/reazul.ashraf/workspace/rust/mcp-memory && cargo build --release -p mcp-memory-linux-nvim'
deploy-nvim:
@Write-Host "Deploying WSL Nvim 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-linux-nvim /home/riz/.local/bin/'
wsl.exe -d Ubuntu -e bash -c 'export PATH="/home/riz/.cargo/bin:$PATH" && cd /mnt/c/Users/reazul.ashraf/workspace/rust/mcp-memory && cp target/release/mcp-memory-linux-nvim /home/riz/.local/bin/'
deploy-rules-wsl:
@Write-Host "Deploying global Agent rules (WSL)..." -ForegroundColor Cyan
wsl.exe -d Ubuntu -e bash -c 'mkdir -p /home/riz/.gemini/config/rules && cp -r /mnt/c/Users/reazul.ashraf/workspace/rust/mcp-memory/agent-rules/* /home/riz/.gemini/config/rules/'
# Run standard unit tests across the workspace
test:
@Write-Host "Running unit tests across workspace..." -ForegroundColor Cyan
cargo test --workspace
# Fast parallel test execution using cargo-nextest
test-fast:
@Write-Host "Running fast parallel tests via cargo-nextest..." -ForegroundColor Cyan
cargo nextest run --workspace
# 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
# Run tests and generate code coverage report with matching rustup LLVM toolchain
test-coverage:
@Write-Host "Running tests with code coverage..." -ForegroundColor Cyan
rustup run stable cargo llvm-cov --workspace
$tc = (rustup toolchain list | Select-String "stable").ToString().Split(' ')[0]; $env:LLVM_COV = "$env:USERPROFILE\.rustup\toolchains\$tc\lib\rustlib\x86_64-pc-windows-msvc\bin\llvm-cov.exe"; $env:LLVM_PROFDATA = "$env:USERPROFILE\.rustup\toolchains\$tc\lib\rustlib\x86_64-pc-windows-msvc\bin\llvm-profdata.exe"; cargo llvm-cov --workspace
# Start the server directly
startup-server:
@@ -145,3 +153,8 @@ all-server-wsl port="3000": (stop port) build-server deploy-server (start port)
build-nvim-win:
@Write-Host 'Building Windows Nvim...' -ForegroundColor Cyan
cargo build --release -p mcp-memory-win-nvim
# Auto-generate & verify unit tests using local NAS Ollama ($0 tokens)
improve-tests file="server/src/ollama.rs":
improve-test {{file}}