Skip to content

Commit

Permalink
feat: add 3-bot-rel-clone-go-dep (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul authored Aug 4, 2022
1 parent 65ed137 commit ea11e5f
Show file tree
Hide file tree
Showing 6 changed files with 2,747 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
berty-clone/
15 changes: 15 additions & 0 deletions gomod-flows/3-bot-rel-clone-go-dep/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
BERTY_PORT ?= 4296
BERTY_GROUP ?= https://berty.tech/id\#group/8ejngpAxnMPPKdsY8DA3jkWA2G4dU3tdh5qFk6Ym9g7Q5Y5zEcPR6tx4wUxjLvqN8aLySh2r7L6UNRXfNXokC9UoN1M5J38bQE5RsEe8orupzr83E1XjHn3y4cTBsVogHm2BFo84pWSGsdWxMVhtkXH3s4yDtuRZkYdB1BVqUvwi6B1s8G9pKSmT1vPMmiMUV3MHBe6pXxVnP3j7Jx5heZrkQeFQWPBeXVQ18ZysQmiroEtZjLPoncx8zSVBqkWMPATqu6JEuhcXN7qPVcN7cxGzxhoo/name=PMG+-+bot+experiments2

run: tidy
go run . --berty-node-addr=127.0.0.1:$(BERTY_PORT) --berty-group-invite="$(BERTY_GROUP)" --debug

start-mini-companion:
berty daemon --node.listeners=/ip4/127.0.0.1/tcp/$(BERTY_PORT)/grpc --store.inmem --p2p.ipfs-api-listeners /ip4/127.0.0.1/tcp/1$(BERTY_PORT)

install: tidy fmt
go install .

# utilities
tidy:; go mod tidy
fmt:; gofumpt -w .
18 changes: 18 additions & 0 deletions gomod-flows/3-bot-rel-clone-go-dep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 3-bot-rel-clone-go-dep

## About

A bot using a cloned berty/berty repo somewhere on the file system.

This method allows:
* patching berty/berty in real time.
* staying in the berty/berty repo to make opening a PR very easy.

Drawback -> "works for me, but not for others" (require people to make more steps)

## How

1. `git clone https://github.com/berty/berty ../berty-clone`
2. Patch it.
3. `make start-mini-companion`
4. `make run`
58 changes: 58 additions & 0 deletions gomod-flows/3-bot-rel-clone-go-dep/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module github.com/pmg.tools/berty-bot-experiments/gomod-flows/3-bot-rel-clone-go-dep

go 1.18

replace (
bazil.org/fuse => bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc // specific version for iOS building
berty.tech/berty/v2 => ../berty-clone
github.com/agl/ed25519 => github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // latest commit before the author shutdown the repo; see https://github.com/golang/go/issues/20504
github.com/libp2p/go-libp2p-rendezvous => github.com/berty/go-libp2p-rendezvous v0.0.0-20211013085524-09965cd64781 // use berty fork of go-libp2p-rendezvous with sqlcipher support
github.com/lucas-clemente/quic-go => github.com/lucas-clemente/quic-go v0.25.0
github.com/multiformats/go-multiaddr => github.com/berty/go-multiaddr v0.4.2-0.20220126184027-53e56f02fb68 // tmp, required for Android SDK30
github.com/mutecomm/go-sqlcipher/v4 => github.com/berty/go-sqlcipher/v4 v4.0.0-20211104165006-2c524b646cf0
github.com/peterbourgon/ff/v3 => github.com/moul/ff/v3 v3.0.1 // temporary, see https://github.com/peterbourgon/ff/pull/67, https://github.com/peterbourgon/ff/issues/68
)

require (
berty.tech/berty/v2 v2.425.3
github.com/mdp/qrterminal/v3 v3.0.0
github.com/oklog/run v1.1.0
github.com/peterbourgon/ff/v3 v3.0.0
go.uber.org/zap v1.21.0
google.golang.org/grpc v1.48.0
moul.io/climan v1.0.0
moul.io/motd v1.0.0
moul.io/srand v1.6.1
moul.io/zapconfig v1.4.0
)

require (
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/gofrs/uuid v3.4.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/ipfs/go-log/v2 v2.4.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/libp2p/go-libp2p-core v0.13.0 // indirect
github.com/libp2p/go-openssl v0.0.7 // indirect
github.com/maruel/circular v0.0.0-20200815005550-36e533b830e9 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/protobuf v1.27.1 // indirect
moul.io/banner v1.0.1 // indirect
moul.io/u v1.27.0 // indirect
moul.io/zapfilter v1.7.0 // indirect
moul.io/zapring v1.3.3 // indirect
rsc.io/qr v0.2.0 // indirect
)
Loading

0 comments on commit ea11e5f

Please sign in to comment.