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

Commit

Permalink
chore: http-rpc-runtime.sh
Browse files Browse the repository at this point in the history
the Rube Goldberg machine for testing HTTP RPC wire format change
end-to-end
  • Loading branch information
lidel committed Oct 21, 2021
1 parent 048db38 commit b5c9d2c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 16
- uses: actions/cache@v2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ dist
test/test-data/go-ipfs-repo/LOCK
test/test-data/go-ipfs-repo/LOG
test/test-data/go-ipfs-repo/LOG.old
types
types
.tmp
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"npm": ">6.0.0"
},
"scripts": {
"postinstall": "bash ./setup-http-rpc-runtime.sh",
"lint": "aegir lint",
"build": "aegir build",
"pretest": "aegir build --esm-tests",
Expand Down
21 changes: 21 additions & 0 deletions setup-http-rpc-runtime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -xeo pipefail

# this script sets up the Rube Goldberg machine for testing HTTP RPC wire format change end-to-end
# context:
# - https://github.com/ipfs/go-ipfs/pull/8183
# - https://github.com/ipfs/js-ipfs/pull/3922


rm -rf node_modules .tmp
mkdir .tmp
cd .tmp
git clone -b feat/pubsub-require-multibase https://github.com/ipfs/js-ipfs.git
cd js-ipfs
npm install
npm run build
npm run link
cd ../..
# make sure npm uses js-ipfs libs from feat/pubsub-require-multibase branch
npx connect-deps link .tmp/js-ipfs/packages/ipfs .tmp/js-ipfs/packages/ipfs-http-client --connect

0 comments on commit b5c9d2c

Please sign in to comment.