From f77851bee0f85b821e35c2775f198a7065d3ce91 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Fri, 6 Nov 2015 23:39:26 -0800 Subject: [PATCH] docker: second --ldflags was overriding the first --ldflags option --- Makefile | 6 +++--- appveyor.yml | 7 ++++--- buildscripts/gen-ldflags.go | 4 ++-- main.go | 3 +++ version-main.go | 9 ++++++++- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index f805d04e1..4c58346dc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ LDFLAGS := $(shell go run buildscripts/gen-ldflags.go) -DOCKER_LDFLAGS = '-extldflags "-static"' +DOCKER_LDFLAGS := $(LDFLAGS) -extldflags "-static" TAG := latest all: install @@ -55,7 +55,7 @@ test: build @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) github.com/minio/minio/pkg... gomake-all: build - GO15VENDOREXPERIMENT=1 go build --ldflags $(LDFLAGS) -o $(GOPATH)/bin/minio + @GO15VENDOREXPERIMENT=1 go build --ldflags '$(LDFLAGS)' -o $(GOPATH)/bin/minio pkg-add: @GO15VENDOREXPERIMENT=1 govendor add $(PKG) @@ -70,7 +70,7 @@ install: gomake-all dockerimage: install @echo "Building docker image:" minio:$(TAG) - @GO15VENDOREXPERIMENT=1 go build --ldflags $(LDFLAGS) --ldflags $(DOCKER_LDFLAGS) -o minio.dockerimage + @GO15VENDOREXPERIMENT=1 go build --ldflags '$(DOCKER_LDFLAGS)' -o minio.dockerimage @mkdir -p export @docker build --rm --tag=minio:$(TAG) . @rmdir export diff --git a/appveyor.yml b/appveyor.yml index de98d04dd..0a05b0a6b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,9 +26,10 @@ build_script: - go test -race . - go test github.com/minio/minio/pkg... - go test -race github.com/minio/minio/pkg... - - go run buildscripts/gen-ldflags.go > temp.txt - - set /p LDFLAGS= temp.txt + # - set /p LDFLAGS=