From aafcc3eb723026bcd7b12221793e2f259c927e65 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Thu, 14 Jul 2016 16:01:59 +0100 Subject: [PATCH 1/2] Update linker flags and strip binaries to shrink download --- Makefile | 2 +- cmd/minikube/cmd/start.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9a982856a51c..6d017d10b5b8 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ BUILD_OS := $(shell uname -s) # Set the version information for the Kubernetes servers K8S_VERSION_LDFLAGS := $(shell $(PYTHON) hack/get_k8s_version.py 2>&1) -MINIKUBE_LDFLAGS := -X github.com/jimmidyson/minishift/pkg/version.version=$(VERSION) +MINIKUBE_LDFLAGS := $(K8S_VERSION_LDFLAGS) -X github.com/jimmidyson/minishift/pkg/version.version=$(VERSION) -s -w -extldflags '-static' MKGOPATH := mkdir -p $(shell dirname $(GOPATH)/src/$(REPOPATH)) && ln -s -f $(shell pwd) $(GOPATH)/src/$(REPOPATH) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index f0cc110be18d..6f372d267211 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -64,8 +64,6 @@ func runStart(cmd *cobra.Command, args []string) { VMDriver: vmDriver, } - fmt.Println(config.DiskSize) - var host *host.Host start := func() (err error) { host, err = cluster.StartHost(api, config) From 202b49847a64f210626978c7eaa3e7f6a824d2d7 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Thu, 14 Jul 2016 17:26:15 +0100 Subject: [PATCH 2/2] Update linker flags for gendocs --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6d017d10b5b8..f4164455e434 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ $(GOPATH)/bin/gh-release: .PHONY: gendocs gendocs: $(shell find cmd) pkg/minikube/cluster/assets.go $(MKGOPATH) - cd $(GOPATH)/src/$(REPOPATH) && go run -ldflags="-X github.com/jimmidyson/minishift/pkg/version.version=$(shell cat VERSION)" gen_help_text.go + cd $(GOPATH)/src/$(REPOPATH) && go run -ldflags="$(MINIKUBE_LDFLAGS)" gen_help_text.go .PHONY: release release: clean deploy/iso/minishift.iso test $(GOPATH)/bin/gh-release cross