fix: update downloadKubekey.sh to set LATEST_VERSION dynamically during release process (#2844)

Signed-off-by: redscholar <blacktiledhouse@gmail.com>
This commit is contained in:
liujian 2025-11-10 11:03:25 +08:00 committed by redscholar
parent 6e382eaa73
commit 8a5ad6ee8c
No known key found for this signature in database
GPG Key ID: 5A4D7C7DB5D38D49
2 changed files with 7 additions and 0 deletions

View File

@ -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:

View File

@ -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 |