Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 3-bot-rel-clone-go-dep #4

Merged
merged 2 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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