Skip to content

Commit

Permalink
Merge pull request #1977 from marquiz/devel/fix-version-parsing
Browse files Browse the repository at this point in the history
Fix version parsing
  • Loading branch information
k8s-ci-robot authored Dec 13, 2024
2 parents 1416072 + 047d031 commit 1ecb1c7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/nfd-gc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func main() {

// Assert that the version is known
if version.Undefined() {
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always`\" during build or run.")
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always --match 'v*'`\" during build or run.")
}

// Get new garbage collector instance
Expand Down
2 changes: 1 addition & 1 deletion cmd/nfd-master/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func main() {

// Assert that the version is known
if version.Undefined() {
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always`\" during build or run.")
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always --match 'v*'`\" during build or run.")
}

// Plug klog into grpc logging infrastructure
Expand Down
2 changes: 1 addition & 1 deletion cmd/nfd-topology-updater/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func main() {

// Assert that the version is known
if version.Undefined() {
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always`\" during build or run.")
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always --match 'v*'`\" during build or run.")
}

// Plug klog into grpc logging infrastructure
Expand Down
2 changes: 1 addition & 1 deletion cmd/nfd-worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func main() {

// Assert that the version is known
if version.Undefined() {
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always`\" during build or run.")
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always --match 'v*'`\" during build or run.")
}

// Plug klog into grpc logging infrastructure
Expand Down
4 changes: 2 additions & 2 deletions scripts/github/update-gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if [ "$site_subdir" != "master" ]; then
;;
*)
echo "Not a released version. Parsed release branch is $site_subdir but based on tag $_base_tag. Stopping here."
echo "SHA `git describe` (`git rev-parse HEAD`)"
echo "SHA `git describe` (`git rev-parse --match 'v*' HEAD`)"
exit 0
;;
esac
Expand All @@ -130,7 +130,7 @@ make site-build
if [ -n "$_GIT_TAG" ]; then
commit_hash=${GIT_TAG:10}
else
commit_hash=`git describe --tags --dirty --always`
commit_hash=`git describe --tags --dirty --always --match "v*"`
fi

# Sync OWNERS file from master branch
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-infra/test-e2e-presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export KIND_NODE_IMAGE="kindest/node:v1.30.2"
export CLUSTER_NAME="nfd-e2e"
export KUBECONFIG="/tmp/kubeconfig_$CLUSTER_NAME"
export IMAGE_REPO="registry.local/node-feature-discovery"
export IMAGE_TAG_NAME=$(git describe --tags --dirty --always)
export IMAGE_TAG_NAME=$(git describe --tags --dirty --always --match "v*")

# Install kind
go install sigs.k8s.io/kind@$KIND_VERSION
Expand Down

0 comments on commit 1ecb1c7

Please sign in to comment.