Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ LIB_DEST := $(SHAREDIR)/lib
DIST_DIR ?= dist
DIST_STAGE := $(DIST_DIR)/$(INSTALL_NAME)

.PHONY: help install lint syntax shellcheck regression push-test pull-test reset-test test package clean-package clean distclean
.PHONY: help install update lint syntax shellcheck regression push-test pull-test reset-test test package clean-package clean distclean

help:
@echo "Available targets:"
@echo " make install # Install $(SCRIPT) into $(BINDIR) (override with PREFIX=…)"
@echo " # Libraries copied to $(LIB_DEST) (override with SHAREDIR=…)"
@echo " make update # Update n8n-git to the latest release from GitHub"
@echo " make lint # Run shell syntax validation and ShellCheck"
@echo " make test # Run the full regression suite (push and pull flows)"
@echo " make package # Stage scripts and docs under $(DIST_STAGE) for release packaging"
Expand Down Expand Up @@ -50,6 +51,17 @@ install: $(SCRIPT)
exit 1; \
fi

update:
@echo "Checking for n8n-git updates..."
@if [ -x "$(BINDIR)/$(INSTALL_NAME)" ]; then \
"$(BINDIR)/$(INSTALL_NAME)" update; \
elif [ -x "./$(SCRIPT)" ]; then \
./$(SCRIPT) update; \
else \
echo "n8n-git not found. Run 'make install' first."; \
exit 1; \
fi

syntax:
@tests/test-syntax.sh

Expand Down
9 changes: 9 additions & 0 deletions lib/utils/interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ Commands:
pull Import workflows, credentials, and environment variables into n8n.
reset Replay Git history to restore, archive, or delete workflows by commit/tag/time.
config Launch the interactive configuration wizard.
update Check for and install the latest version of n8n-git.
version Display version information and check for updates.

GitHub Options:
--repo <user/repo> Git repository (e.g., 'myuser/n8n-backups').
Expand Down Expand Up @@ -232,6 +234,7 @@ General Options:
--log-file <path> Append logs to file.
--config <path> Custom config file path.
-h, --help Show this help message.
-V, --version Show version information.

Configuration Precedence:
1. CLI arguments (highest priority)
Expand All @@ -250,6 +253,12 @@ Examples:
# Interactive time travel through Git history
n8n-git reset --interactive --mode soft

# Check for updates and install latest version
n8n-git update

# Show version info
n8n-git version

For more help, see: https://github.com/tcoretech/n8n-git
EOF
}
Expand Down
Loading