-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
344 lines (318 loc) · 11.7 KB
/
.goreleaser.yml
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
project_name: bee
builds:
- id: linux
main: ./cmd/bee
binary: bee
flags:
- -v
- -trimpath
ldflags:
- -s -w -X github.com/ethersphere/bee.version={{.Version}} -X github.com/ethersphere/bee.commit={{.ShortCommit}}
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 7
- id: windows
main: ./cmd/bee
binary: bee
flags:
- -v
- -trimpath
ldflags:
- -s -w -X github.com/ethersphere/bee.version={{.Version}} -X github.com/ethersphere/bee.commit={{.ShortCommit}}
env:
- CGO_ENABLED=0
goos:
- windows
goarch:
- amd64
- 386
- id: darwin
main: ./cmd/bee
binary: bee
flags:
- -v
- -trimpath
ldflags:
- -s -w -X github.com/ethersphere/bee.version={{.Version}} -X github.com/ethersphere/bee.commit={{.ShortCommit}}
env:
- CGO_ENABLED=0
goos:
- darwin
goarch:
- amd64
snapshot:
name_template: "{{.Tag}}-snapshot"
signs:
- artifacts: checksum
args: [
"--pinentry-mode", "loopback",
"--passphrase", "{{ .Env.GPG_PASSPHRASE }}",
"-u", "{{ .Env.GPG_FINGERPRINT }}",
"--output", "${signature}",
"--detach-sign", "${artifact}",
]
archives:
-
id: scoop
builds:
- windows
name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format: zip
wrap_in_directory: false
files:
- packaging/scoop/bee.yaml
- LICENSE
- README.md
-
name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format: binary
-
id: homebrew
builds:
- darwin
name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- packaging/homebrew/bee.yaml
- packaging/homebrew/bee-get-addr
- LICENSE
- README.md
nfpms:
- file_name_template: "{{ tolower .ProjectName }}_{{ tolower .Version }}_{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
vendor: Ethereum Swarm
homepage: https://swarm.ethereum.org/
maintainer: Janoš Guljaš <[email protected]>
description: Ethereum Swarm node
license: GPL-3
dependencies:
- ca-certificates
- adduser
formats:
- deb
- rpm
contents:
- src: packaging/bee.service
dst: /lib/systemd/system/bee.service
- src: packaging/bee-get-addr
dst: /usr/bin/bee-get-addr
- src: packaging/bee.yaml
dst: /etc/bee/bee.yaml
type: config
- src: packaging/default
dst: /etc/default/bee
type: config
overrides:
deb:
dependencies:
- passwd
- ca-certificates
scripts:
preinstall: ./packaging/deb/preinst
postinstall: ./packaging/deb/postinst
preremove: ./packaging/deb/prerm
postremove: ./packaging/deb/postrm
rpm:
dependencies:
- ca-certificates
- shadow-utils
scripts:
preinstall: ./packaging/rpm/pre
postinstall: ./packaging/rpm/post
preremove: ./packaging/rpm/preun
postremove: ./packaging/rpm/postun
bindir: /usr/bin
scoop:
url_template: "https://github.com/ethersphere/bee/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
bucket:
owner: ethersphere
name: scoop
token: "{{ .Env.SCOOP_PAT }}"
commit_author:
name: bee-worker
email: [email protected]
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/ethersphere/bee"
description: "Swarm client implemented in Go."
license: BSD-3-Clause
persist:
- "data"
- "packaging/scoop/bee.yaml"
post_install:
- "Write-Host 'Running postinstall command'"
- "if(!(Test-Path $persist_dir\\bee.yaml)){New-Item -ItemType SymbolicLink -Path \"$persist_dir\\bee.yaml\" -Target \"$persist_dir\\packaging\\scoop\\bee.yaml\" | Out-Null}"
- "(Get-Content -path $persist_dir\\bee.yaml -Raw) -replace './bee.yaml',\"$persist_dir\\bee.yaml\" | Set-Content -Path $persist_dir\\bee.yaml"
- "(Get-Content -path $persist_dir\\bee.yaml -Raw) -replace './data',\"$persist_dir\\data\" | Set-Content -Path $persist_dir\\bee.yaml"
- "(Get-Content -path $persist_dir\\bee.yaml -Raw) -replace './password',\"$persist_dir\\password\" | Set-Content -Path $persist_dir\\bee.yaml"
- "if(!(Test-Path $persist_dir\\password)){[System.Web.Security.Membership]::GeneratePassword(32,5) | Set-Content -Path $persist_dir\\password}"
- "if(sc.exe query SwarmBeeSvc | Select-String FAILED){sc.exe create SwarmBeeSvc binPath= \"$dir\\bee.exe start --config=$persist_dir\\bee.yaml\" type= share start= auto displayName= \"Bee\"; sc.exe description SwarmBeeSvc \"Swarm client implemented in Go.\"}"
- "if($global){$ETH_ADDRESS = (((C:\\ProgramData\\scoop\\shims\\bee.exe init --config=$persist_dir\\bee.yaml | Select-String ethereum) -split ' ‘)[-1]).Trim('\"')} else {$ETH_ADDRESS = (((bee.exe init --config=$persist_dir\\bee.yaml | Select-String ethereum) -split ' ‘)[-1]).Trim('\"')}; Write-Host \"Please make sure there is sufficient eth and bzz available on $ETH_ADDRESS address.\nLearn how to fund your node by visiting our docs at https://docs.ethswarm.org/docs/installation/fund-your-node\""
- "Write-Host \"Obtain a free Infura account and set: swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx inside $persist_dir\\bee.yaml\""
- "Write-Host \"After the initial fund deploy Bee chequebook with [sudo] $dir\\bee.exe deploy --config=$persist_dir\\bee.yaml\""
- "Write-Host 'Start Bee service with [sudo] sc.exe start SwarmBeeSvc'"
brews:
- name: swarm-bee
tap:
owner: ethersphere
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_PAT }}"
ids:
- homebrew
commit_author:
name: bee-worker
email: [email protected]
homepage: https://swarm.ethereum.org/
description: Ethereum Swarm node
caveats: |
Logs: #{var}/log/swarm-bee/bee.log
Config: #{etc}/swarm-bee/bee.yaml
Bee requires an Ethereum endpoint to function. By default is using ws://localhost:8546 ethereum endpoint.
If needed obtain a free Infura account and set:
`swap-endpoint: wss://goerli.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
It is recommended to use external signer with bee.
Check documentation for more info:
- SWAP https://docs.ethswarm.org/docs/installation/manual#swap-bandwidth-incentives
- External signer https://docs.ethswarm.org/docs/installation/bee-clef
After you finish configuration run 'bee-get-addr'.
test: |
system "#{bin}/bee version"
install: |
(etc/"swarm-bee").mkpath
(var/"lib/swarm-bee").mkpath
bin.install ["bee", "packaging/homebrew/bee-get-addr"]
etc.install "packaging/homebrew/bee.yaml" => "swarm-bee/bee.yaml" unless File.exists? etc/"swarm-bee/bee.yaml"
post_install: |
unless File.exists? "#{var}/lib/swarm-bee/password"
system("openssl", "rand", "-out", var/"lib/swarm-bee/password", "-base64", "32")
end
system(bin/"bee", "init", "--config", etc/"swarm-bee/bee.yaml", ">/dev/null", "2>&1")
plist: |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{bin}/bee</string>
<string>start</string>
<string>--config</string>
<string>#{etc}/swarm-bee/bee.yaml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/usr/local</string>
<key>StandardOutPath</key>
<string>#{var}/log/swarm-bee/bee.log</string>
<key>StandardErrorPath</key>
<string>#{var}/log/swarm-bee/bee.log</string>
</dict>
</plist>
dockers:
- image_templates:
- "ethersphere/bee:{{ .Version }}-amd64"
- "quay.io/ethersphere/bee:{{ .Version }}-amd64"
use_buildx: true
ids:
- linux
goarch: amd64
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates:
- "ethersphere/bee:{{ .Version }}-armv7"
- "quay.io/ethersphere/bee:{{ .Version }}-armv7"
use_buildx: true
ids:
- linux
goarch: arm
goarm: 7
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/arm/v7"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates:
- "ethersphere/bee:{{ .Version }}-arm64v8"
- "quay.io/ethersphere/bee:{{ .Version }}-arm64v8"
use_buildx: true
ids:
- linux
goarch: arm64
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
docker_manifests:
- name_template: ethersphere/bee:{{ .Major }}
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }}
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }}.{{ .Patch }}
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:latest
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:beta
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: quay.io/ethersphere/bee:{{ .Major }}
image_templates:
- quay.io/ethersphere/bee:{{ .Version }}-amd64
- quay.io/ethersphere/bee:{{ .Version }}-armv7
- quay.io/ethersphere/bee:{{ .Version }}-arm64v8
- name_template: quay.io/ethersphere/bee:{{ .Major }}.{{ .Minor }}
image_templates:
- quay.io/ethersphere/bee:{{ .Version }}-amd64
- quay.io/ethersphere/bee:{{ .Version }}-armv7
- quay.io/ethersphere/bee:{{ .Version }}-arm64v8
- name_template: quay.io/ethersphere/bee:{{ .Major }}.{{ .Minor }}.{{ .Patch }}
image_templates:
- quay.io/ethersphere/bee:{{ .Version }}-amd64
- quay.io/ethersphere/bee:{{ .Version }}-armv7
- quay.io/ethersphere/bee:{{ .Version }}-arm64v8
- name_template: quay.io/ethersphere/bee:latest
image_templates:
- quay.io/ethersphere/bee:{{ .Version }}-amd64
- quay.io/ethersphere/bee:{{ .Version }}-armv7
- quay.io/ethersphere/bee:{{ .Version }}-arm64v8
- name_template: quay.io/ethersphere/bee:beta
image_templates:
- quay.io/ethersphere/bee:{{ .Version }}-amd64
- quay.io/ethersphere/bee:{{ .Version }}-armv7
- quay.io/ethersphere/bee:{{ .Version }}-arm64v8