Skip to content

Commit

Permalink
goreleaser: fix ldflags and change archive name template (#156)
Browse files Browse the repository at this point in the history
* goreleaser: fix ldflags and change archive name template

* fix
  • Loading branch information
chnliyong authored Jan 29, 2021
1 parent 8de6506 commit 4c56261
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ env:
- GO111MODULE=on
- CGO_ENABLED=1
- GOPROXY=https://gocenter.io
- PKG=github.com/juicedata/juicefs/pkg/version
before:
hooks:
- go mod download
Expand All @@ -12,7 +11,7 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
ldflags: -s -w -X ${PKG}.version={{.Version}} -X ${PKG}.revision={{.ShortCommit}} -X ${PKG}.revisionDate={{.CommitDate}}
ldflags: -s -w -X github.com/juicedata/juicefs/pkg/version.version={{.Version}} -X github.com/juicedata/juicefs/pkg/version.revision={{.ShortCommit}} -X github.com/juicedata/juicefs/pkg/version.revisionDate={{.CommitDate}}
main: ./cmd
goos:
- darwin
Expand All @@ -21,7 +20,7 @@ builds:
- id: juicefs-linux-amd64
env:
- STATIC=1
ldflags: -s -w -X ${PKG}.version={{.Version}} -X ${PKG}.revision={{.ShortCommit}} -X ${PKG}.revisionDate={{.CommitDate}}
ldflags: -s -w -X github.com/juicedata/juicefs/pkg/version.version={{.Version}} -X github.com/juicedata/juicefs/pkg/version.revision={{.ShortCommit}} -X github.com/juicedata/juicefs/pkg/version.revisionDate={{.CommitDate}}
main: ./cmd
goos:
- linux
Expand All @@ -30,7 +29,7 @@ builds:
- id: juicefs-linux-arm64
env:
- CC=aarch64-linux-gnu-gcc
ldflags: -s -w -X ${PKG}.version={{.Version}} -X ${PKG}.revision={{.ShortCommit}} -X ${PKG}.revisionDate={{.CommitDate}}
ldflags: -s -w -X github.com/juicedata/juicefs/pkg/version.version={{.Version}} -X github.com/juicedata/juicefs/pkg/version.revision={{.ShortCommit}} -X github.com/juicedata/juicefs/pkg/version.revisionDate={{.CommitDate}}
main: ./cmd
goos:
- linux
Expand All @@ -46,6 +45,9 @@ changelog:
exclude:
- '^docs:'
- '^test:'
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"

brews:
- tap:
owner: juicedata
Expand Down

0 comments on commit 4c56261

Please sign in to comment.