From a610dbb004816bb4138b7df3c948fbf9bf1fc50d Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 21 Oct 2021 13:17:37 +0200 Subject: [PATCH] chore: http-rpc-runtime.sh the Rube Goldberg machine for testing HTTP RPC wire format change end-to-end --- .gitignore | 3 ++- http-rpc-runtime.sh | 21 +++++++++++++++++++++ package.json | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 http-rpc-runtime.sh diff --git a/.gitignore b/.gitignore index 729bf0ce..6c6739b2 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +types +.tmp diff --git a/http-rpc-runtime.sh b/http-rpc-runtime.sh new file mode 100755 index 00000000..ad63bf09 --- /dev/null +++ b/http-rpc-runtime.sh @@ -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 diff --git a/package.json b/package.json index 0e69128d..09c646ab 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "npm": ">6.0.0" }, "scripts": { + "postinstall": "bash ./http-rpc-runtime.sh", "lint": "aegir lint", "build": "aegir build", "pretest": "aegir build --esm-tests",