Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
ec2959fc
Unverified
Commit
ec2959fc
authored
Nov 22, 2020
by
Ivan Vandot
Committed by
GitHub
Nov 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
homebrew publish support (#994)
parent
bcb3ab60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
176 additions
and
17 deletions
+176
-17
.goreleaser.yml
.goreleaser.yml
+88
-17
bee-get-addr
packaging/homebrew/bee-get-addr
+20
-0
bee.yaml
packaging/homebrew/bee.yaml
+68
-0
No files found.
.goreleaser.yml
View file @
ec2959fc
project_name
:
bee
builds
:
-
main
:
./cmd/bee/main.go
-
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
-
linux
-
windows
goarch
:
-
amd64
-
386
-
arm64
-
arm
goarm
:
-
7
ignore
:
-
goos
:
darwin
goarch
:
386
-
goos
:
darwin
goarch
:
arm64
-
goos
:
darwin
goarch
:
arm
-
goos
:
windows
goarch
:
arm64
-
goos
:
windows
goarch
:
arm
-
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"
archives
:
-
name_template
:
"
{{
tolower
.ProjectName
}}-{{
tolower
.Os
}}-{{
tolower
.Arch
}}{{
if
.Arm
}}v{{
.Arm
}}{{
end
}}"
-
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
}}"
...
...
@@ -95,3 +107,62 @@ nfpms:
postremove
:
./packaging/rpm/postun
bindir
:
/usr/bin
brews
:
-
name
:
swarm-bee
tap
:
owner
:
ethersphere
name
:
homebrew-tap
token
:
"
{{
.Env.HOMEBREW_TAP_PAT
}}"
ids
:
-
homebrew
commit_author
:
name
:
bee-worker
email
:
bee-worker@ethswarm.org
homepage
:
https://swarm.ethereum.org/
description
:
Ethereum Swarm node
caveats
:
|
Logs: #{var}/log/bee/bee.log
Config: #{etc}/bee/bee.yaml
Bee has SWAP enabled by default and it needs ethereum endpoint to operate.
It is recommended to use external signer with bee.
Check documentation for more info https://docs.ethswarm.org/
After you finish configuration run 'bee-get-addr'.
test
:
|
system "#{bin}/bee version"
install
:
|
(etc/"bee").mkpath
(var/"lib/bee").mkpath
bin.install ["bee", "packaging/homebrew/bee-get-addr"]
etc.install "packaging/homebrew/bee.yaml" => "bee/bee.yaml" unless File.exists? etc/"bee/bee.yaml"
post_install
:
|
system("openssl", "rand", "-base64", "32", "-out", var/"lib/bee/password")
system(bin/"bee", "init", "--config", etc/"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}/bee/bee.yaml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/usr/local</string>
<key>StandardOutPath</key>
<string>#{var}/log/bee/bee.log</string>
<key>StandardErrorPath</key>
<string>#{var}/log/bee/bee.log</string>
</dict>
</plist>
packaging/homebrew/bee-get-addr
0 → 100755
View file @
ec2959fc
#!/bin/sh
RESP
=
$(
/usr/local/bin/bee init
--config
/usr/local/etc/bee/bee.yaml 2>&1
)
case
"
$RESP
"
in
Error
*
)
echo
"
Enabled clef-signer but clef is not running.
Check https://docs.ethswarm.org/ for more info.
After you fix configuration run 'bee-get-addr' again.
"
;;
*
)
ETH_ADDRESS
=
$(
echo
"
$RESP
"
|
grep
ethereum |
cut
-d
' '
-f6
|
tr
-d
'"'
)
echo
"
Please make sure there is sufficient eth and bzz available on
$ETH_ADDRESS
address.
You can get both goerli eth and goerli bzz from https://faucet.ethswarm.org
After you get the funds start service with 'brew services start swarm-bee'.
"
;;
esac
packaging/homebrew/bee.yaml
0 → 100644
View file @
ec2959fc
## Bee configuration - https://swarm-gateways.net/bzz:/docs.swarm.eth/docs/installation/configuration
## HTTP API listen address (default ":1633")
# api-addr: :1633
## initial nodes to connect to (default [/dnsaddr/bootnode.ethswarm.org])
# bootnode: [/dnsaddr/bootnode.ethswarm.org]
## enable clef signer
# clef-signer-enable: false
## clef signer endpoint
clef-signer-endpoint
:
/usr/local/var/lib/bee-clef/clef.ipc
## config file (default is /home/<user>/.bee.yaml)
config
:
/usr/local/etc/bee/bee.yaml
## origins with CORS headers enabled
# cors-allowed-origins: []
## data directory (default "/home/<user>/.bee")
data-dir
:
/usr/local/var/lib/bee
## db capacity in chunks, multiply by 4096 to get approximate capacity in bytes
# db-capacity: 5000000
## debug HTTP API listen address (default ":1635")
# debug-api-addr: 127.0.0.1:1635
## enable debug HTTP API
# debug-api-enable: false
## disable a set of sensitive features in the api
# gateway-mode: false
## enable global pinning
# global-pinning-enable: false
## NAT exposed address
# nat-addr: ""
## ID of the Swarm network (default 1)
# network-id: 1
## P2P listen address (default ":1634")
# p2p-addr: :1634
## enable P2P QUIC protocol
# p2p-quic-enable: false
## enable P2P WebSocket transport
# p2p-ws-enable: false
## password for decrypting keys
# password: ""
## path to a file that contains password for decrypting keys
password-file
:
/usr/local/var/lib/bee/password
## amount in BZZ below the peers payment threshold when we initiate settlement (default 10000)
# payment-early: 10000
## threshold in BZZ where you expect to get paid from your peers (default 100000)
# payment-threshold: 100000
## excess debt above payment threshold in BZZ where you disconnect from your peer (default 10000)
# payment-tolerance: 10000
## ENS compatible API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url
# resolver-options: []
## whether we want the node to start with no listen addresses for p2p
# standalone: false
## enable swap (default true)
# swap-enable: true
## swap ethereum blockchain endpoint (default "http://localhost:8545")
# swap-endpoint: http://localhost:8545
## swap factory address
# swap-factory-address: ""
## initial deposit if deploying a new chequebook (default 100000000)
# swap-initial-deposit: 100000000
## enable tracing
# tracing-enable: false
## endpoint to send tracing data (default "127.0.0.1:6831")
# tracing-endpoint: 127.0.0.1:6831
## service name identifier for tracing (default "bee")
# tracing-service-name: bee
## log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace (default "info")
# verbosity: info
## send a welcome message string during handshakes
# welcome-message: ""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment