From 8a5ad6ee8c4457030db06afd3ca9748298e65cc2 Mon Sep 17 00:00:00 2001 From: liujian Date: Mon, 10 Nov 2025 11:03:25 +0800 Subject: [PATCH] fix: update downloadKubekey.sh to set LATEST_VERSION dynamically during release process (#2844) Signed-off-by: redscholar --- .github/workflows/releaser.yaml | 2 ++ hack/downloadKubekey.sh | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/releaser.yaml b/.github/workflows/releaser.yaml index ad11091c..5e0668e1 100644 --- a/.github/workflows/releaser.yaml +++ b/.github/workflows/releaser.yaml @@ -48,6 +48,8 @@ jobs: else REGISTRY=docker.io/kubespheredev TAG=$tag make generate fi + sed -i "s/^LATEST_VERSION=.*/LATEST_VERSION=${TAG}/" hack/downloadKubekey.sh + gh release upload "$TAG" config/capkk/release/* --clobber gh release upload "$TAG" hack/downloadKubekey.sh --clobber env: diff --git a/hack/downloadKubekey.sh b/hack/downloadKubekey.sh index 7740eafa..58349642 100755 --- a/hack/downloadKubekey.sh +++ b/hack/downloadKubekey.sh @@ -15,6 +15,7 @@ # limitations under the License. ISLINUX=true +LATEST_VERSION= OSTYPE="linux" @@ -33,6 +34,10 @@ if [ "x$(uname)" != "xLinux" ]; then ISLINUX=false fi +if [ "x${VERSION}" = "xlatest" ]; then + VERSION=${LATEST_VERSION} +fi + # Fetch latest version of 3.x if [ "x${VERSION}" = "x" ]; then VERSION="$(curl -sL https://api.github.com/repos/kubesphere/kubekey/releases |