Skip to content

Commit

Permalink
Merge pull request #240 from yevgeny-shnaidman/yevgeny/code-version
Browse files Browse the repository at this point in the history
Getting rid of pkg/version
  • Loading branch information
k8s-ci-robot authored Jun 10, 2024
2 parents 0b42db2 + 2dedaae commit febaa0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ GOOS=linux
PACKAGE=sigs.k8s.io/node-feature-discovery-operator
MAIN_PACKAGE=main.go
BIN=node-feature-discovery-operator
LDFLAGS = -ldflags "-s -w -X sigs.k8s.io/node-feature-discovery-operator/pkg/version.version=$(VERSION)"
LDFLAGS = -ldflags "-s -w -X main.version=$(VERSION)"

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ import (
"sigs.k8s.io/node-feature-discovery-operator/internal/deployment"
"sigs.k8s.io/node-feature-discovery-operator/internal/job"
"sigs.k8s.io/node-feature-discovery-operator/internal/status"
"sigs.k8s.io/node-feature-discovery-operator/pkg/version"
// +kubebuilder:scaffold:imports
)

var (
// scheme holds a new scheme for the operator
scheme = runtime.NewScheme()
scheme = runtime.NewScheme()
version = "undefined"
)

const (
Expand Down Expand Up @@ -92,7 +92,7 @@ func main() {
}

if *printVersion {
fmt.Println(ProgramName, version.Get())
fmt.Println(ProgramName, version)
os.Exit(0)
}

Expand Down

0 comments on commit febaa0a

Please sign in to comment.