Skip to content

Commit

Permalink
Merge pull request #40 from tomdee/fix-versioning
Browse files Browse the repository at this point in the history
Fix versioning
  • Loading branch information
tomdee authored Aug 10, 2018
2 parents 8a32a66 + 76ec8a5 commit ea3a32b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ MAKE_SURE_BIN_EXIST := $(shell mkdir -p dist .go-pkg-cache $(NODE_CONTAINER_BIN_
NODE_CONTAINER_FILES=$(shell find ./filesystem -type f)
SRCFILES=$(shell find ./pkg -name '*.go')
LOCAL_USER_ID?=$(shell id -u $$USER)
LDFLAGS=-ldflags "-X main.VERSION=$(CALICO_GIT_VER)"
LDFLAGS=-ldflags "-X github.com/projectcalico/node/pkg/startup.VERSION=$(CALICO_GIT_VER)"
PACKAGE_NAME?=github.com/projectcalico/node
LIBCALICOGO_PATH?=none

Expand Down
5 changes: 1 addition & 4 deletions cmd/calico-node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ import (
"github.com/sirupsen/logrus"
)

// Populated by build - used for printing version.
var VERSION string

// Create a new flag set.
var flagSet = flag.NewFlagSet("Calico", flag.ContinueOnError)

Expand Down Expand Up @@ -89,7 +86,7 @@ func main() {

// Decide which action to take based on the given flags.
if *version {
fmt.Println(VERSION)
fmt.Println(startup.VERSION)
os.Exit(0)
} else if *runFelix {
felix.Run("/etc/calico/felix.cfg")
Expand Down
8 changes: 4 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea3a32b

Please sign in to comment.