1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Fix version parsing

The fix in a416af51a4 was not enough by
itself and that needs to be applied comprehensively.

(cherry picked from commit 047d0314aa)
This commit is contained in:
Markus Lehtonen 2024-12-12 22:14:50 +02:00
parent e2dbd2c1ac
commit 06c6abcf14
6 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -102,7 +102,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

View file

@ -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

View file

@ -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.")
}
// Check deprecated flags

View file

@ -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
@ -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

View file

@ -4,7 +4,7 @@ set -o pipefail
# Configure environment
KIND_IMAGE="kindest/node:v1.25.3"
export IMAGE_REGISTRY="localhost:5001"
export CLUSTER_NAME=$(git describe --tags --dirty --always)
export CLUSTER_NAME=$(git describe --tags --dirty --always --match "v*")
export KUBECONFIG="/tmp/kubeconfig_$CLUSTER_NAME"
# create registry container unless it already exists