mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
build: -s -w should be added by gen-ldflags.go (#4172)
This commit is contained in:
parent
3b1626216d
commit
dc365bca44
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
LDFLAGS := $(shell go run buildscripts/gen-ldflags.go)
|
LDFLAGS := $(shell go run buildscripts/gen-ldflags.go)
|
||||||
PWD := $(shell pwd)
|
PWD := $(shell pwd)
|
||||||
GOPATH := $(shell go env GOPATH)
|
GOPATH := $(shell go env GOPATH)
|
||||||
BUILD_LDFLAGS := '$(LDFLAGS) -s -w'
|
BUILD_LDFLAGS := '$(LDFLAGS)'
|
||||||
TAG := latest
|
TAG := latest
|
||||||
|
|
||||||
HOST ?= $(shell uname)
|
HOST ?= $(shell uname)
|
||||||
|
@ -27,8 +27,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func genLDFlags(version string) string {
|
func genLDFlags(version string) string {
|
||||||
var ldflagsStr string
|
ldflagsStr := "-s -w"
|
||||||
ldflagsStr = "-X github.com/minio/minio/cmd.Version=" + version
|
ldflagsStr += " -X github.com/minio/minio/cmd.Version=" + version
|
||||||
ldflagsStr += " -X github.com/minio/minio/cmd.ReleaseTag=" + releaseTag(version)
|
ldflagsStr += " -X github.com/minio/minio/cmd.ReleaseTag=" + releaseTag(version)
|
||||||
ldflagsStr += " -X github.com/minio/minio/cmd.CommitID=" + commitID()
|
ldflagsStr += " -X github.com/minio/minio/cmd.CommitID=" + commitID()
|
||||||
ldflagsStr += " -X github.com/minio/minio/cmd.ShortCommitID=" + commitID()[:12]
|
ldflagsStr += " -X github.com/minio/minio/cmd.ShortCommitID=" + commitID()[:12]
|
||||||
|
Loading…
Reference in New Issue
Block a user