Skip to content

Commit

Permalink
Merge pull request #8 from ryarnyah/feat/upx-ldflags
Browse files Browse the repository at this point in the history
Reintegrate upx
  • Loading branch information
ryarnyah committed Oct 12, 2021
2 parents efb978d + a833304 commit 359f921
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
go-version: '1.17'
- name: Build
run: |
apt-get update && apt-get install -y upx
make dev-dependencies
make
make cover
make release
find build -type f ! -name "*.md5" ! -name "*.sha256" -exec upx -9 {} \;
2 changes: 2 additions & 0 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ jobs:
go-version: '1.17'
- name: Build
run: |
apt-get update && apt-get install -y upx
make dev-dependencies
make release
find build -type f ! -name "*.md5" ! -name "*.sha256" -exec upx -9 {} \;
- uses: softprops/action-gh-release@v1
with:
files: "build/local-dns-proxy-*"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ ifneq ($(GITUNTRACKEDCHANGES),)
GITCOMMIT := $(GITCOMMIT)-dirty
endif
CTIMEVAR=-X $(BASE_PKG)/$(1)/version.GITCOMMIT=$(GITCOMMIT) -X $(BASE_PKG)/$(1)/version.VERSION=$(VERSION)
GO_LDFLAGS=-ldflags "-w $(call CTIMEVAR,$(1))"
GO_LDFLAGS_STATIC=-ldflags "-w $(call CTIMEVAR,$(1)) -extldflags -static"
GO_LDFLAGS=-ldflags "-s -w $(call CTIMEVAR,$(1))"
GO_LDFLAGS_STATIC=-ldflags "-s -w $(call CTIMEVAR,$(1)) -extldflags -static"

# List the GOOS and GOARCH to build
GOOSARCHES = linux/arm linux/amd64 linux/arm64 windows/amd64 windows/386
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.2.1

0 comments on commit 359f921

Please sign in to comment.