Skip to content

Commit

Permalink
fix:build: Add trimpath Go flag to build (#316)
Browse files Browse the repository at this point in the history
<!-- Feel free to delete comments as you fill this in -->

<!-- summary of changes -->
Trimpath Go flag to builds. This way my local machine paths won't get baked into the binary.

## Test Plan
Copy/pasted from https://github.com/goreleaser/goreleaser/blob/master/.goreleaser.yml#L21

## References
<!-- issues documentation links, etc  -->

* https://github.com/goreleaser/goreleaser/blob/master/.goreleaser.yml
  • Loading branch information
Eduardo Lopez committed Nov 30, 2020
1 parent 3febbc0 commit 420a84b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Expand Up @@ -13,6 +13,8 @@ builds:
- '386'
- arm
- arm64
flags:
- -trimpath
ldflags:
- "-w -s -X github.com/chanzuckerberg/go-misc/ver.GitSha={{.Commit}} -X github.com/chanzuckerberg/go-misc/ver.Version={{.Version}} -X github.com/chanzuckerberg/go-misc/ver.Dirty={{.Env.DIRTY}}"
ignore:
Expand Down

0 comments on commit 420a84b

Please sign in to comment.