Some checks failed
code_sanitizers.yml / squashed commit (push) Failing after 0s
Static Analyzers / clang_format (push) Has been cancelled
Static Analyzers / cmake_format (push) Has been cancelled
Static Analyzers / code_inspector (push) Has been cancelled
Code Flamegraphs / Linux [large_confirmation] (push) Has been cancelled
Code Flamegraphs / Linux [large_direct_processing] (push) Has been cancelled
Unit Tests / macOS [lmdb] (push) Has been cancelled
Unit Tests / macOS [rocksdb] (push) Has been cancelled
Unit Tests / Linux [lmdb | clang] (push) Has been cancelled
Unit Tests / Linux [lmdb | gcc] (push) Has been cancelled
Unit Tests / Linux [rocksdb | clang] (push) Has been cancelled
Unit Tests / Linux [rocksdb | gcc] (push) Has been cancelled
Unit Tests / Windows [lmdb] (push) Has been cancelled
Unit Tests / Windows [rocksdb] (push) Has been cancelled
42 lines
613 B
Bash
Executable file
42 lines
613 B
Bash
Executable file
#!/bin/bash
|
|
|
|
network='live'
|
|
|
|
print_usage() {
|
|
echo 'build.sh [-h] [-n {live|beta|dev}]'
|
|
}
|
|
|
|
while getopts 'hn:' OPT; do
|
|
case "${OPT}" in
|
|
h)
|
|
print_usage
|
|
exit 0
|
|
;;
|
|
n)
|
|
network="${OPTARG}"
|
|
;;
|
|
*)
|
|
print_usage >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
case "${network}" in
|
|
live)
|
|
network_tag=''
|
|
;;
|
|
dev | beta)
|
|
network_tag="-${network}"
|
|
;;
|
|
*)
|
|
echo "Invalid network: ${network}" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
COMMIT_SHA=$(git rev-parse --short HEAD)
|
|
pushd $REPO_ROOT
|
|
podman build --build-arg NETWORK="${network}" -f docker/node/Dockerfile -t nano-node${network_tag}:latest .
|
|
popd
|