diff --git a/Makefile b/Makefile index 968e716..8bd9cbd 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -TARGETS = darwin/amd64 darwin/386 linux/amd64 linux/386 windows/amd64 windows/386 +TARGETS = darwin/amd64 linux/amd64 linux/386 windows/amd64 windows/386 GIT_COMMIT = $(shell git rev-parse HEAD) BUILD_TIME = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ" | tr -d '\n') GO_VERSION = $(shell go version | awk {'print $$3'}) @@ -50,12 +50,12 @@ release: clean assets @echo "Building binaries..." @gox \ -osarch "$(TARGETS)" \ - -ldflags "-X github.com/sosedoff/pgweb/pkg/command.GitCommit=$(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime=$(BUILD_TIME) -X github.com/sosedoff/pgweb/pkg/command.GoVersion=$(GO_VERSION)" \ + -ldflags "-s -w -X github.com/sosedoff/pgweb/pkg/command.GitCommit=$(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime=$(BUILD_TIME) -X github.com/sosedoff/pgweb/pkg/command.GoVersion=$(GO_VERSION)" \ -output "./bin/pgweb_{{.OS}}_{{.Arch}}" @echo "Building ARM binaries..." GOOS=linux GOARCH=arm GOARM=5 go build \ - -ldflags "-X github.com/sosedoff/pgweb/pkg/command.GitCommit=$(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime=$(BUILD_TIME) -X github.com/sosedoff/pgweb/pkg/command.GoVersion=$(GO_VERSION)" \ + -ldflags "-s -w -X github.com/sosedoff/pgweb/pkg/command.GitCommit=$(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime=$(BUILD_TIME) -X github.com/sosedoff/pgweb/pkg/command.GoVersion=$(GO_VERSION)" \ -o "./bin/pgweb_linux_arm_v5" @echo "\nPackaging binaries...\n"