Files
nixpkgs/pkgs/by-name/n8/n8n/update.sh
Gutyina Gergő 1c03a3fb23 n8n: fix update script
Upstream added versions with -exp-\d suffix which broke the script.
Instead of adding another filter to the current query, let's try getting
the latest stable version instead.
IIRC previously they didn't correctly mark stable releases which is why
we didn't use this method.
2026-05-24 19:37:21 +02:00

9 lines
319 B
Bash
Executable File

#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash curl jq nix-update cacert git
set -euo pipefail
new_version="$(curl -s ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} \
'https://api.github.com/repos/n8n-io/n8n/releases/latest' |
jq -r '.tag_name | sub("^n8n@"; "")')"
nix-update n8n --version "$new_version"