victoriametrics: replace custom upadateScript with nix-update-script (#506120)

This commit is contained in:
Leona Maroni
2026-04-30 08:36:54 +00:00
committed by GitHub
2 changed files with 2 additions and 14 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
nixosTests,
withServer ? true, # the actual metrics server
withVmAgent ? true, # Agent to collect metrics
@@ -78,7 +79,7 @@ buildGoModule (finalAttrs: {
passthru = {
tests = lib.recurseIntoAttrs nixosTests.victoriametrics;
updateScript = ./update.sh;
updateScript = nix-update-script { };
};
meta = {
-13
View File
@@ -1,13 +0,0 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl jq nix-update
set -ex
curl_github() {
curl -L ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
}
latestRelease=$(curl_github https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest | jq -r ".tag_name")
latestVersion="$(expr "$latestRelease" : 'v\(.*\)')"
nix-update --version "$latestVersion" victoriametrics