Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

22 lines
913 B
Bash
Executable File

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts coreutils curl jq
set -euo pipefail
current_version="$(nix --extra-experimental-features nix-command eval -f . github-mcp-server.version --raw)"
latest_version="$(curl -s -H "Accept: application/vnd.github.v3+json" \
${GITHUB_TOKEN:+ -H "Authorization: bearer $GITHUB_TOKEN"} \
"https://api.github.com/repos/github/github-mcp-server/releases/latest" | jq -r ".tag_name")"
latest_version="${latest_version#v}" # v0.17.1 -> 0.17.1
if [[ "$latest_version" == "$current_version" ]]; then
echo "github-mcp-server is already up to date: $current_version"
exit 0
fi
echo "Updating github-mcp-server from $current_version to $latest_version"
update-source-version github-mcp-server "$latest_version"
echo "Updating Go modules hash..."
$(nix-build -A github-mcp-server.goModules --no-out-link 2>/dev/null || true)