Skip to content

Commit

Permalink
let goreleaser build debug file (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwinger233 authored Dec 22, 2021
1 parent 6b8872e commit 8028bc8
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,50 @@ before:
- go mod download

builds:
- binary: eru-agent
- id: eru-agent-debug
binary: eru-agent.dbg
env:
- CGO_ENABLED=0
ldflags:
- -s -w
- -X github.com/projecteru2/agent/version.REVISION={{.Commit}}
- -X github.com/projecteru2/agent/version.VERSION={{.Env.VERSION}}
- -X github.com/projecteru2/agent/version.BUILTAT={{.Date}}
hooks:
post:
- cp {{.Path}} ./eru-agent-{{.Os}}.dbg
goos:
- darwin
- linux
goarch:
- amd64

# the best practice is using prebuilt builder
# however it's a Pro feature
- id: eru-agent-linux
binary: eru-agent
hooks:
post:
- cp ./eru-agent-{{.Os}}.dbg {{.Path}}
- strip {{.Path}}
goos:
- linux
goarch:
- amd64

- id: eru-agent-darwin
binary: eru-agent
env:
- CGO_ENABLED=0
ldflags:
- -w -s
- -X github.com/projecteru2/agent/version.REVISION={{.Commit}}
- -X github.com/projecteru2/agent/version.VERSION={{.Env.VERSION}}
- -X github.com/projecteru2/agent/version.BUILTAT={{.Date}}
goos:
- darwin
goarch:
- amd64

archives:
- replacements:
darwin: Darwin
Expand Down

0 comments on commit 8028bc8

Please sign in to comment.