Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 24fc605

Browse files
authored
[trivial] pass ldflags for version build (#27)
1 parent d421dff commit 24fc605

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ verify: lint test
4343
.PHONY: build
4444
build:
4545
@echo "### Building"
46-
go build -mod vendor -o goflow-kube cmd/goflow-kube.go
46+
go build -ldflags "-X main.version=${VERSION}" -mod vendor -o goflow-kube cmd/goflow-kube.go
4747

4848
.PHONY: image
4949
image:

cmd/goflow-kube.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import (
2626

2727
const netflowScheme = "netflow"
2828
const legacyScheme = "nfl"
29+
const app = "goflow-kube"
2930

3031
var (
3132
version = "unknown"
32-
app = "goflow-kube"
3333
mainConfigPath = flag.String("config", "", "absolute path to the main configuration file")
3434
kubeConfigPath = flag.String("kubeconfig", "", "absolute path to a kubeconfig file for advanced kube client configuration")
3535
logLevel = flag.String("loglevel", "info", "log level")

0 commit comments

Comments
 (0)