From cac9b3f6b84f488884027f0e4ed10761cb410da0 Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Tue, 27 May 2025 21:48:03 +0200 Subject: [PATCH] k3s: make update script work with all versions Currently only the newest k3s version has a `git_version` script. Since the update script wants to source the `git_version` script, it fails for all other ver/sions. This commit lets k3s' `version` script source the `git_version` script, if it is present. This fixes the update script so that it works with all versions again. --- pkgs/applications/networking/cluster/k3s/update-script.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/k3s/update-script.sh b/pkgs/applications/networking/cluster/k3s/update-script.sh index 7339b2ec4e97..a2693b542e99 100755 --- a/pkgs/applications/networking/cluster/k3s/update-script.sh +++ b/pkgs/applications/networking/cluster/k3s/update-script.sh @@ -35,8 +35,7 @@ cd "$K3S_STORE_PATH" # Set the DRONE variables as they are expected to be set in version.sh DRONE_TAG="$LATEST_TAG_NAME" DRONE_COMMIT="$K3S_COMMIT" -NO_DAPPER=1 # Skips git_version.sh execution in scripts/version.sh#L8 -source "${K3S_STORE_PATH}/scripts/git_version.sh" +NO_DAPPER="" # Source git_version.sh in scripts/version.sh#L8 source "${K3S_STORE_PATH}/scripts/version.sh" K3S_ROOT_SHA256=$(nix-prefetch-url --quiet --unpack \