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

Merge pull request #1977 from marquiz/devel/fix-version-parsing

Fix version parsing
This commit is contained in:
Kubernetes Prow Robot 2024-12-13 08:44:28 +01:00 committed by GitHub
commit 1ecb1c7b22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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

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

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.")
}
// Plug klog into grpc logging infrastructure

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

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