mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-08 06:43:22 +00:00
fix: auto-update n8n_version in .env on branch switch
This commit is contained in:
@@ -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.
|
||||
|
||||
16
Makefile
16
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
|
||||
|
||||
Reference in New Issue
Block a user