Skip to content

Commit

Permalink
Binary strip with upx
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien B authored and Sébastien B committed Jun 26, 2019
1 parent dc24dae commit bb6fd48
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ _testmain.go
*.prof
.goxc.local.json

.goreleaser.yml
dist/
33 changes: 33 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# you may remove this if you don't use vgo
- go mod download
# you may remove this if you don't need go generate
- go generate ./...

builds:
- env:
- CGO_ENABLED=0

hooks:
#upost: /bin/bash upx.sh

archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
3 changes: 3 additions & 0 deletions upx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -ex
upx dist/speedtest-go*/speedtest-go*

0 comments on commit bb6fd48

Please sign in to comment.