Skip to content

Commit

Permalink
Added dist-local target, added upx compression
Browse files Browse the repository at this point in the history
  • Loading branch information
cpliakas committed Jan 21, 2021
1 parent 01a453b commit 166618e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# This is an example .goreleaser.yml 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 go modules.
# - go mod download
# you may remove this if you don't need go generate
# - go generate ./...

builds:
- env:
- CGO_ENABLED=0
Expand All @@ -15,17 +17,23 @@ builds:
- darwin
ldflags:
- -s -w -X main.Version={{.Version}}
hooks:
post: upx -qqq -9 {{ .Path }}

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:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.PHONY: dist
dist:
goreleaser

.PHONY: dist-local
dist-local:
goreleaser --snapshot --skip-publish --rm-dist

.PHONY: run
Expand Down

0 comments on commit 166618e

Please sign in to comment.