mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-25 17:12:50 +00:00
Refine version number
Signed-off-by: pixiake <guofeng@yunify.com>
This commit is contained in:
parent
0c5c3586ca
commit
a6e392b1ed
3
Makefile
3
Makefile
|
|
@ -6,11 +6,14 @@ GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null)
|
|||
GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean")
|
||||
|
||||
VERSION_METADATA = unreleased
|
||||
VERSION = latest
|
||||
# Clear the "unreleased" string in BuildMetadata
|
||||
ifneq ($(GIT_TAG),)
|
||||
VERSION_METADATA =
|
||||
VERSION = ${GIT_TAG}
|
||||
endif
|
||||
|
||||
LDFLAGS += -X github.com/kubesphere/kubekey/version.version=${VERSION}
|
||||
LDFLAGS += -X github.com/kubesphere/kubekey/version.metadata=${VERSION_METADATA}
|
||||
LDFLAGS += -X github.com/kubesphere/kubekey/version.gitCommit=${GIT_COMMIT}
|
||||
LDFLAGS += -X github.com/kubesphere/kubekey/version.gitTreeState=${GIT_DIRTY}
|
||||
|
|
|
|||
5
build.sh
5
build.sh
|
|
@ -8,13 +8,16 @@ GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "dirty" || echo "clean")
|
|||
|
||||
|
||||
VERSION_METADATA=unreleased
|
||||
VERSION=latest
|
||||
# Clear the "unreleased" string in BuildMetadata
|
||||
if [[ -n $GIT_TAG ]]
|
||||
then
|
||||
VERSION_METADATA=
|
||||
VERSION=${GIT_TAG}
|
||||
fi
|
||||
|
||||
LDFLAGS="-X github.com/kubesphere/kubekey/version.metadata=${VERSION_METADATA}
|
||||
LDFLAGS="-X github.com/kubesphere/kubekey/version.version=${VERSION}
|
||||
-X github.com/kubesphere/kubekey/version.metadata=${VERSION_METADATA}
|
||||
-X github.com/kubesphere/kubekey/version.gitCommit=${GIT_COMMIT}
|
||||
-X github.com/kubesphere/kubekey/version.gitTreeState=${GIT_DIRTY}"
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ var (
|
|||
//
|
||||
// Increment major number for new feature additions and behavioral changes.
|
||||
// Increment minor number for bug fixes and performance enhancements.
|
||||
version = "v1.0.1"
|
||||
version = "latest"
|
||||
|
||||
// metadata is extra build time data
|
||||
metadata = ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue