diff --git a/.env.example b/.env.example index f62751d..f3c871a 100644 --- a/.env.example +++ b/.env.example @@ -179,7 +179,7 @@ RUN_N8N_IMPORT= # n8n version (used for both n8n and task runner images) # Update this when upgrading n8n to ensure runner version matches -N8N_VERSION=stable +N8N_VERSION=2.0.0 # Number of n8n worker-runner pairs to generate. # Each worker gets its own dedicated task runner sidecar. diff --git a/Makefile b/Makefile index 3aae5c6..f299f4b 100644 --- a/Makefile +++ b/Makefile @@ -50,9 +50,25 @@ restarts: switch-beta: git restore docker-compose.yml git checkout develop + @if [ -f .env ]; then \ + if grep -q '^N8N_VERSION=' .env; then \ + sed -i.bak 's/^N8N_VERSION=.*/N8N_VERSION=2.0.0/' .env && rm -f .env.bak; \ + else \ + echo 'N8N_VERSION=2.0.0' >> .env; \ + fi; \ + fi + @echo "N8N_VERSION set to 2.0.0" sudo bash ./scripts/update.sh switch-stable: git restore docker-compose.yml git checkout main + @if [ -f .env ]; then \ + if grep -q '^N8N_VERSION=' .env; then \ + sed -i.bak 's/^N8N_VERSION=.*/N8N_VERSION=stable/' .env && rm -f .env.bak; \ + else \ + echo 'N8N_VERSION=stable' >> .env; \ + fi; \ + fi + @echo "N8N_VERSION set to stable" sudo bash ./scripts/update.sh