py-libp2p/install_interop_go_pkgs.sh
mhchia c6d81d70b3
Try 3.7-dev in CI
Use https over ssh when cloning go-libp2p-daemon

To avoid """
Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
"""

Exit if clone fails

Fix daemon url
2019-09-03 22:50:14 +08:00

31 lines
650 B
Bash
Executable File

#!/bin/bash
GO_PKGS_PATH=./tests/interop/go_pkgs
DAEMON_REPO=go-libp2p-daemon
DAEMON_PATH=$GO_PKGS_PATH/$DAEMON_REPO
EXAMPLES_PATHS=$GO_PKGS_PATH/examples
go version
# Install `p2pd`
# FIXME: Use the canonical repo in libp2p, when we don't need `insecure`.
if [ ! -e "$DAEMON_PATH" ]; then
git clone https://github.com/mhchia/$DAEMON_REPO.git --branch test/add-options $DAEMON_PATH
if [ "$?" != 0 ]; then
echo "Failed to clone the daemon repo"
exit 1
fi
fi
cd $DAEMON_PATH && go install ./...
cd -
# Install example modeuls
cd $EXAMPLES_PATHS && go install ./...
echo "Finish installing go modeuls for interop."