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.
This commit is contained in:
parent
1416072699
commit
047d0314aa
6 changed files with 7 additions and 7 deletions
|
@ -47,7 +47,7 @@ func main() {
|
||||||
|
|
||||||
// Assert that the version is known
|
// Assert that the version is known
|
||||||
if version.Undefined() {
|
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
|
// Get new garbage collector instance
|
||||||
|
|
|
@ -83,7 +83,7 @@ func main() {
|
||||||
|
|
||||||
// Assert that the version is known
|
// Assert that the version is known
|
||||||
if version.Undefined() {
|
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
|
// Plug klog into grpc logging infrastructure
|
||||||
|
|
|
@ -49,7 +49,7 @@ func main() {
|
||||||
|
|
||||||
// Assert that the version is known
|
// Assert that the version is known
|
||||||
if version.Undefined() {
|
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
|
// Plug klog into grpc logging infrastructure
|
||||||
|
|
|
@ -56,7 +56,7 @@ func main() {
|
||||||
|
|
||||||
// Assert that the version is known
|
// Assert that the version is known
|
||||||
if version.Undefined() {
|
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
|
// Plug klog into grpc logging infrastructure
|
||||||
|
|
|
@ -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 "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
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -130,7 +130,7 @@ make site-build
|
||||||
if [ -n "$_GIT_TAG" ]; then
|
if [ -n "$_GIT_TAG" ]; then
|
||||||
commit_hash=${GIT_TAG:10}
|
commit_hash=${GIT_TAG:10}
|
||||||
else
|
else
|
||||||
commit_hash=`git describe --tags --dirty --always`
|
commit_hash=`git describe --tags --dirty --always --match "v*"`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sync OWNERS file from master branch
|
# Sync OWNERS file from master branch
|
||||||
|
|
|
@ -7,7 +7,7 @@ export KIND_NODE_IMAGE="kindest/node:v1.30.2"
|
||||||
export CLUSTER_NAME="nfd-e2e"
|
export CLUSTER_NAME="nfd-e2e"
|
||||||
export KUBECONFIG="/tmp/kubeconfig_$CLUSTER_NAME"
|
export KUBECONFIG="/tmp/kubeconfig_$CLUSTER_NAME"
|
||||||
export IMAGE_REPO="registry.local/node-feature-discovery"
|
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
|
# Install kind
|
||||||
go install sigs.k8s.io/kind@$KIND_VERSION
|
go install sigs.k8s.io/kind@$KIND_VERSION
|
||||||
|
|
Loading…
Reference in a new issue