Skip to content

Commit

Permalink
Merge pull request #257 from mrpalide/fix/use-right-flag-goreleaser
Browse files Browse the repository at this point in the history
Fix goreleaser configs
  • Loading branch information
mrpalide authored Mar 25, 2024
2 parents 0ba753f + 30b253e commit 11a0be7
Show file tree
Hide file tree
Showing 4 changed files with 378 additions and 137 deletions.
132 changes: 85 additions & 47 deletions .goreleaser-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Make sure to check the documentation at http://goreleaser.com

release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL or empty if its private hosted.
# Note: it can only be one: either github or gitlab or gitea
github:
owner: skycoin
name: dmsg
Expand All @@ -12,13 +15,30 @@ before:
hooks:
- go mod tidy

env:
- CGO_ENABLED=0
builds:
- id: dmsg-discovery
binary: dmsg-discovery
goos:
- darwin
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=1
main: ./cmd/dmsg-discovery/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

common_flags: >
-s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}}
-X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}}
-X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}
- id: dmsg-server
binary: dmsg-server
goos:
- darwin
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=0
main: ./cmd/dmsg-server/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: dmsgcurl
binary: dmsgcurl
Expand All @@ -32,47 +52,41 @@ common_flags: >
main: ./cmd/dmsgcurl/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

targets:
- name: dmsg-discovery
id: discovery
arch: arm64

- name: dmsg-server
id: server
arch: arm64

- name: dmsgget
id: get
arch: arm64

- name: dmsgpost
id: post
arch: arm64

- name: dmsghttp
id: http
arch: arm64

- name: dmsgpty-ui
id: ui
arch: arm64

- name: dmsgpty-cli
id: cli
arch: arm64
- id: dmsgpty-ui
binary: dmsgpty-ui
goos:
- darwin
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=0
main: ./cmd/dmsgpty-ui/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- name: dmsgpty-host
id: host
arch: arm64
- id: dmsgpty-host
binary: dmsgpty-host
goos:
- darwin
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=0
main: ./cmd/dmsgpty-host/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

builds: &builds
{{ range .Targets }}
- id: {{ .id }}-{{ .arch }}
binary: {{ .name }}
- id: dmsgpty-cli
binary: dmsgpty-cli
goos:
- darwin
goarch:
- {{ .arch }}
<<: *common_build
{{ end }}
- arm64
- amd64
env:
- CGO_ENABLED=0
main: ./cmd/dmsgpty-cli/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: dmsgweb
binary: dmsgweb
Expand All @@ -86,6 +100,30 @@ builds: &builds
main: ./cmd/dmsgweb/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: dmsghttp
binary: dmsghttp
goos:
- darwin
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=0
main: ./cmd/dmsghttp/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: dmsg-socks5
binary: dmsg-socks5
goos:
- darwin
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=0
main: ./cmd/dmsg-socks5/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

archives:
- id: archive
format: tar.gz
Expand All @@ -99,14 +137,14 @@ archives:
- dmsgcurl
- dmsgpty-cli
- dmsgweb
- dmsghttp
- dmsg-socks5
allow_different_binary_count: true

checksum:
name_template: 'checksums.txt'

name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
Expand Down
Loading

0 comments on commit 11a0be7

Please sign in to comment.