Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
chore: go-ipfs 0.11.0-rc1 + libp2p-relay-daemon 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Dec 1, 2021
1 parent e984eb3 commit 4b3e399
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
# uncomment env below and define git revisions in ./scripts/custom-runtime.sh

env:
IPFS_GO_EXEC: /tmp/go-ipfs/cmd/ipfs/ipfs
#IPFS_GO_EXEC: /tmp/go-ipfs/cmd/ipfs/ipfs
IPFS_JS_EXEC: /tmp/js-ipfs/packages/ipfs/src/cli.js
IPFS_JS_MODULE: /tmp/js-ipfs/packages/ipfs/dist/cjs/src/index.js
IPFS_JS_HTTP_MODULE: /tmp/js-ipfs/packages/ipfs-http-client/dist/cjs/src/index.js
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ test/test-data/go-ipfs-repo/LOG
test/test-data/go-ipfs-repo/LOG.old
types
go-libp2p-relay-daemon
*.identity
scripts/libp2p-relay-daemon
*.identity
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"npm": ">6.0.0"
},
"scripts": {
"postinstall": "./scripts/setup-relayd.sh",
"postinstall": "./scripts/setup-libp2p-relay-daemon.sh",
"clean": "rimraf /tmp/js-ipfs /tmp/go-ipfs ./go-libp2p-relay-daemon",
"lint": "aegir lint",
"build": "aegir build",
Expand Down Expand Up @@ -102,7 +102,7 @@
],
"devDependencies": {
"execa": "^5.1.1",
"go-ipfs": "^0.9.1",
"go-ipfs": "0.11.0-rc1",
"ipfs": "^0.59.0",
"ipfs-http-client": "^53.0.0"
}
Expand Down
12 changes: 12 additions & 0 deletions scripts/setup-libp2p-relay-daemon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# This script ensures go-libp2p-relay-daemon is available
# for use in circuit v1 and v2 tests.

set -eo pipefail

if ! test -e ./scripts/libp2p-relay-daemon; then
echo "Fetching ./scripts/libp2p-relay-daemon binary.."
GOBIN=$(realpath ./scripts) go install github.com/libp2p/go-libp2p-relay-daemon/cmd/libp2p-relay-daemon@v0.1.0
echo "./scripts/libp2p-relay-daemon is ready"
fi
17 changes: 0 additions & 17 deletions scripts/setup-relayd.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/utils/relayd.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function getRelayV (version, factory) {
if (relays.has(version)) return relays.get(version)
if (process.env.DEBUG) console.log(`Starting relayd_v${version}..`) // eslint-disable-line no-console
if (version < 1 || version > 2) throw new Error('Unsupported circuit relay version')
const relayd = command(`go-libp2p-relay-daemon/relayd -config scripts/relayd_v${version}.config.json -id scripts/relayd_v${version}.identity`)
const relayd = command(`scripts/libp2p-relay-daemon -config scripts/relayd_v${version}.config.json -id scripts/relayd_v${version}.identity`)
let id
for await (const line of relayd.stdout) {
const text = line.toString()
Expand Down

0 comments on commit 4b3e399

Please sign in to comment.