Skip to content

Commit

Permalink
Pull request: add -ldflags "-s -w" to release smaller binaries
Browse files Browse the repository at this point in the history
Merge in DNS/dnsproxy from 109-no-debug to master

Closes #109.

Squashed commit of the following:

commit 303b281
Author: 02f <74245651+02f@users.noreply.github.com>
Date:   Tue Nov 10 20:51:25 2020 +0800

    add -ldflags "-s -w" to release smaller binaries
  • Loading branch information
ainar-g committed Nov 10, 2020
1 parent d8a0880 commit 2f7a50c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ release: check-env-release
mkdir -p $(BUILDDIR)
cp LICENSE $(BUILDDIR)/
cp README.md $(BUILDDIR)/
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -mod=vendor -ldflags "-X main.VersionString=$(VERSION)" -o $(BUILDDIR)/$(NAME)$(ext)
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -mod=vendor -ldflags "-s -w -X main.VersionString=$(VERSION)" -o $(BUILDDIR)/$(NAME)$(ext)
cd $(BASE_BUILDDIR) ; $(archiveCmd)

test:
Expand All @@ -40,4 +40,4 @@ check-env-release:
@ if [ "$(GOARCH)" = "" ]; then \
echo "Environment variable GOOS not set"; \
exit 1; \
fi
fi

0 comments on commit 2f7a50c

Please sign in to comment.