mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
[#1851] fix hack/version.sh incorrect git version
This commit is contained in:
parent
3367bfcc18
commit
4327920cb4
|
|
@ -33,7 +33,7 @@ version::get_version_vars() {
|
|||
|
||||
# stolen from k8s.io/hack/lib/version.sh
|
||||
# Use git describe to find the version based on annotated tags.
|
||||
if [[ -n ${GIT_VERSION-} ]] || GIT_VERSION=$(git describe --abbrev=14 --match "v[0-9]*" 2>/dev/null); then
|
||||
if [[ -n ${GIT_VERSION-} ]] || GIT_VERSION=$(git describe --tags --abbrev=14 --match "v[0-9]*" "${GIT_COMMIT}" 2>/dev/null); then
|
||||
# This translates the "git describe" to an actual semver.org
|
||||
# compatible semantic version that looks something like this:
|
||||
# v1.1.0-alpha.0.6+84c76d1142ea4d
|
||||
|
|
|
|||
Loading…
Reference in New Issue