Files
atomic-swap/scripts/build.sh
Janaka-Steph d13521daef Modify scripts to run on MacOS (#233)
Updates scripts/docs to support macOS as well as Linux/aarch64 (arm64)
2023-01-16 14:05:35 -06:00

28 lines
754 B
Bash
Executable File

#!/usr/bin/env bash
PROJECT_ROOT="$(dirname "$(dirname "$(realpath "$0")")")"
cd "${PROJECT_ROOT}" || exit 1
# Make sure no one is souring the script before we change GOBIN
if [[ "${BASH_SOURCE[0]}" != "$0" ]]; then
echo "Execute ${BASH_SOURCE[0]} instead of souring it"
return
fi
# Fail script on any error
set -e
mkdir -p bin
export GOBIN="${PROJECT_ROOT}/bin"
if [[ -n "${ALL}" ]]; then
go install -tags=prod ./cmd/...
else
go install -tags=prod ./cmd/swapd ./cmd/swapcli
fi
# Since we are inside a project using go modules when performing this
# install, the version installed will match the go-relayer dependency in
# our go.mod file. To override, add a @version suffix on the end.
go install github.com/athanorlabs/go-relayer/cmd/relayer