Files
atomic-swap/scripts/build.sh
Dmitry Holodov 007162b929 New bash library, and well as bash linting and formatting (#170)
* Allows unit and integration tests to share the same bash code via a utility library named testlib.sh.
* Linting and formatting of bash scripts was added to the Makefile targets lint and format.
* Updated the docker image and Go used by git actions
2022-08-25 13:24:13 -05:00

42 lines
742 B
Bash
Executable File

#!/bin/bash
PROJECT_ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")"
cd "${PROJECT_ROOT}" || exit 1
echo "building swapd..."
cd cmd/daemon || exit 1
if ! go build -o swapd; then
exit 1
fi
mv swapd ../.. || exit 1
echo "done building swapd."
echo "building swapcli..."
cd ../client || exit 1
if ! go build -o swapcli; then
exit 1
fi
mv swapcli ../..
echo "done building swapcli."
if [[ -z "${ALL}" ]]; then
exit 0
fi
echo "build swaprecover..."
cd ../recover || exit 1
if ! go build -o swaprecover; then
exit 1
fi
mv swaprecover ../..
echo "done building swaprecover."
echo "building swaptester..."
cd ../tester || exit 1
if ! go build -o swaptester; then
exit 1
fi
mv swaptester ../..
cd ../..
echo "done building swaptester."