Skip to content

Commit

Permalink
Merge pull request openshift#14930 from adelton/match-v-tag
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Jun 30, 2017
2 parents 848f52e + c75db15 commit 394f73e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hack/godep-save.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ done

# fail early if we don't have a proper kube version from the latest git tag
function kube-version () {
local git_v=$(cd "${GOPATH}/src/k8s.io/kubernetes" && git describe --tags)
local git_v=$(cd "${GOPATH}/src/k8s.io/kubernetes" && git describe --tags --match 'v[0-9]*')
echo "${git_v##-*}"
}
if ! [[ "$(kube-version)" =~ v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ ]]; then
Expand Down
2 changes: 1 addition & 1 deletion hack/lib/build/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function os::build::version::openshift_vars() {
fi
fi
# Use git describe to find the version based on annotated tags.
if [[ -n ${OS_GIT_VERSION-} ]] || OS_GIT_VERSION=$("${git[@]}" describe --long --tags --abbrev=7 "${OS_GIT_COMMIT}^{commit}" 2>/dev/null); then
if [[ -n ${OS_GIT_VERSION-} ]] || OS_GIT_VERSION=$("${git[@]}" describe --long --tags --abbrev=7 --match 'v[0-9]*' "${OS_GIT_COMMIT}^{commit}" 2>/dev/null); then
# Try to match the "git describe" output to a regex to try to extract
# the "major" and "minor" versions and whether this is the exact tagged
# version or whether the tree is between two tagged versions.
Expand Down

0 comments on commit 394f73e

Please sign in to comment.