forked from xmtp/xmtpd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
104 lines (95 loc) · 3.53 KB
/
Copy path.goreleaser.yaml
File metadata and controls
104 lines (95 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: 2
project_name: xmtpd
before:
hooks:
- go mod tidy
# Build a native helper we can run on the host to generate completions.
- bash -euo pipefail -c 'mkdir -p build/tools && go build -o build/tools/xmtpd-cli-gen ./cmd/xmtpd-cli'
# Generate completions into build/completions.
- bash -euo pipefail -c 'mkdir -p build/completions'
- bash -euo pipefail -c 'build/tools/xmtpd-cli-gen completion bash > build/completions/xmtpd-cli.bash && test -s build/completions/xmtpd-cli.bash'
- bash -euo pipefail -c 'build/tools/xmtpd-cli-gen completion zsh > build/completions/_xmtpd-cli && test -s build/completions/_xmtpd-cli'
- bash -euo pipefail -c 'build/tools/xmtpd-cli-gen completion fish > build/completions/xmtpd-cli.fish && test -s build/completions/xmtpd-cli.fish'
builds:
- id: xmtpd
main: ./cmd/replication/main.go
binary: xmtpd
env:
- CGO_ENABLED=0
goos: [ linux, darwin ]
goarch: [ amd64, arm64 ]
ldflags:
- '-s -w -X main.Version={{ if .IsSnapshot }}{{ replace .Version "/" "-" }}-next+{{ .ShortCommit }}{{ else }}{{ .Tag }}-{{ .ShortCommit }}{{ end }}'
- id: xmtpd-cli
main: ./cmd/xmtpd-cli/main.go
binary: xmtpd-cli
env:
- CGO_ENABLED=0
goos: [linux, darwin]
goarch: [amd64, arm64]
ldflags:
- '-s -w -X main.Version={{ if .IsSnapshot }}{{ replace .Version "/" "-" }}-next+{{ .ShortCommit }}{{ else }}{{ .Tag }}-{{ .ShortCommit }}{{ end }}'
archives:
- id: xmtpd-zips
ids: [ xmtpd ]
formats: [ "zip" ]
name_template: '{{ .Binary }}_{{ replace .Version "/" "-" }}_{{ .Os }}_{{ .Arch }}'
wrap_in_directory: true
- id: xmtpd-tars
ids: [ xmtpd ]
formats: [ "tar.gz" ]
name_template: '{{ .Binary }}_{{ replace .Version "/" "-" }}_{{ .Os }}_{{ .Arch }}'
wrap_in_directory: true
- id: zips
ids: [xmtpd-cli]
formats: ["zip"]
name_template: '{{ .Binary }}_{{ replace .Version "/" "-" }}_{{ .Os }}_{{ .Arch }}'
wrap_in_directory: true
files:
- LICENSE*
- src: build/completions/xmtpd-cli.bash
dst: completions/xmtpd-cli.bash
- src: build/completions/_xmtpd-cli
dst: completions/_xmtpd-cli
- src: build/completions/xmtpd-cli.fish
dst: completions/xmtpd-cli.fish
- id: tars
ids: [xmtpd-cli]
formats: ["tar.gz"]
name_template: '{{ .Binary }}_{{ replace .Version "/" "-" }}_{{ .Os }}_{{ .Arch }}'
wrap_in_directory: true
files:
- LICENSE*
- src: build/completions/xmtpd-cli.bash
dst: completions/xmtpd-cli.bash
- src: build/completions/_xmtpd-cli
dst: completions/_xmtpd-cli
- src: build/completions/xmtpd-cli.fish
dst: completions/xmtpd-cli.fish
checksum:
name_template: 'checksums_{{ replace .Version "/" "-" }}.txt'
homebrew_casks:
- name: xmtpd-cli
ids: [zips]
binaries: [xmtpd-cli]
homepage: https://github.com/xmtp/xmtpd
description: "CLI to manage the XMTP Network."
repository:
owner: xmtp
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
completions:
bash: completions/xmtpd-cli.bash
zsh: completions/_xmtpd-cli
fish: completions/xmtpd-cli.fish
hooks:
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/xmtpd-cli"]
end
skip_upload: auto
caveats: |
xmtpd-cli is not notarized. The installer removes the macOS quarantine attribute.
Prefer signed/notarized builds when available.