Skip to content

Commit

Permalink
Merge pull request #5746 from MartinForReal/master
Browse files Browse the repository at this point in the history
Fix:ignore azclient tags when fetch git tags
  • Loading branch information
lzhecheng authored Mar 20, 2024
2 parents be8af87 + 97b7160 commit 0ca52ac
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pipelines/ccm-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ steps:
sudo GOPATH="/home/vsts/go" make install
popd
export IMAGE_TAG="$(git describe --tags)"
export IMAGE_TAG="$(git describe --tags --match "v[0-9].*")"
kubetest2 aks --build --target ccm --targetPath `pwd`
displayName: make and push ccm image
env:
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/cnm-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ steps:
sudo GOPATH="/home/vsts/go" make install
popd
export IMAGE_TAG="$(git describe --tags)"
export IMAGE_TAG="$(git describe --tags --match "v[0-9].*")"
kubetest2 aks --build --target cnm --targetPath `pwd`
displayName: make and push cnm image
env:
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/scripts/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fi
# cloud provider azure. This will remove dependency on cloud-provider-azure repo, and use
# explicit variables makes the interface more clear.
if [[ -z "${IMAGE_TAG:-}" ]]; then
IMAGE_TAG="$(git describe --tags)"
IMAGE_TAG="$(git describe --tags --match "v[0-9].*")"
fi

if [[ -z "${CLUSTER_CONFIG_PATH:-}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion hack/pkg-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -e
cd $(dirname "${BASH_SOURCE}")/..

if [ "${ENABLE_GIT_COMMAND}" = true ]; then
GIT_VERSION=$(git describe --tags --always --abbrev=9 || echo)
GIT_VERSION=$(git describe --tags --match "v[0-9].*" --always --abbrev=9 || echo)
GIT_COMMIT=$(git rev-parse HEAD)
version_regex="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-([a-zA-Z0-9-]+)?$"
[[ "${GIT_VERSION}" =~ ${version_regex} ]] && {
Expand Down
4 changes: 2 additions & 2 deletions hack/print-workspace-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi

# stolen from k8s.io/hack/lib/version.sh
# Use git describe to find the version based on tags.
if GIT_VERSION=$(git describe --tags --abbrev=14 2>/dev/null); then
if GIT_VERSION=$(git describe --tags --match "v[0-9].*" --abbrev=14 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
Expand Down Expand Up @@ -67,7 +67,7 @@ if GIT_VERSION=$(git describe --tags --abbrev=14 2>/dev/null); then
fi

GIT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
GIT_RELEASE_TAG=$(git describe --abbrev=0 --tags)
GIT_RELEASE_TAG=$(git describe --match "v[0-9].*" --abbrev=0 --tags)
GIT_RELEASE_COMMIT=$(git rev-list -n 1 ${GIT_RELEASE_TAG} | head -c 14)

cat <<EOF
Expand Down
2 changes: 1 addition & 1 deletion kubetest2-aks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ REPO_ROOT:=$(shell pwd)
export REPO_ROOT
OUT_DIR=$(REPO_ROOT)/bin
# record the source commit in the binary, overridable
COMMIT?=$(shell git describe --tags --always --dirty 2>/dev/null)
COMMIT?=$(shell git describe --tags --match "v[0-9].*" --always --dirty 2>/dev/null)
INSTALL?=install
# make install will place binaries here
INSTALL_DIR?=$(GOPATH)/bin
Expand Down

0 comments on commit 0ca52ac

Please sign in to comment.