From 31f3abaf239222811c8d0f9e6caa225e2e55b6be Mon Sep 17 00:00:00 2001 From: Bassam Tabbara Date: Mon, 14 Nov 2016 14:54:51 -0800 Subject: [PATCH] build: fix the build version Fixes #178 --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 81eea2544..1f42f51d4 100644 --- a/Makefile +++ b/Makefile @@ -69,12 +69,6 @@ else MAKEFLAGS += --no-print-directory endif -# set the version number. -ifeq ($(origin VERSION), undefined) -VERSION = $(shell git describe --dirty --always) -endif -LDFLAGS += -X $(REPO)/pkg/version.Version=$(VERSION) - # the operating system and arch to build GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) @@ -92,6 +86,12 @@ ALL_PLATFORMS ?= $(CLIENT_SERVER_PLATFORMS) $(CLIENT_ONLY_PLATFORMS) GO_PROJECT=github.com/rook/rook +# set the version number. +ifeq ($(origin VERSION), undefined) +VERSION = $(shell git describe --dirty --always) +endif +LDFLAGS += -X $(GO_PROJECT)/pkg/version.Version=$(VERSION) + # ==================================================================================== # Setup rookd