Skip to content

Commit

Permalink
release: fix go release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Dec 25, 2021
1 parent 71590c3 commit c723fa0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- go mod download
- sudo apt-get install -y upx
# before:
hooks:
- go mod download
- sudo apt-get install -y upx
builds:
- id: ehco
main: ./cmd/ehco/main.go
flags:
- -trimpath
ldflags:
- -w -s -X ${PACKAGE}.GitBranch=${BRANCH} -X ${PACKAGE}.GitRevision=${REVISION} -X ${PACKAGE}.BuildTime=${BUILDTIME}
- -w -s
- -X github.com/Ehco1996/ehco/internal/constant.GitBranch={{.Branch}}
- -X github.com/Ehco1996/ehco/internal/constant.GitRevision={{.ShortCommit}}
- -X github.com/Ehco1996/ehco/internal/constant.BuildTime={{.Date}}
goarch:
- amd64
- arm64
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ tidy:
ensure: tidy
go mod download


release:
goreleaser build --skip-validate --rm-dist

0 comments on commit c723fa0

Please sign in to comment.