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 ina416af51a4
was not enough by itself and that needs to be applied comprehensively. (cherry picked from commit047d0314aa
)
This commit is contained in:
parent
e2dbd2c1ac
commit
06c6abcf14
6 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue