mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-394] Add --cleanup to ./run-dev.sh (#441)
* [NOD-394] Rename --only-build to --no-run. * [NOD-394] Allow --rm and --no-build to be run together with no-run. * [NOD-394] Make --cleanup alias for --rm --no-run --no-build. * [NOD-394] Fix typo in usage string. * [NOD-394] Set docker/docker-compose.yaml to use devnet instead of testnet.
This commit is contained in:
parent
a9b659a36f
commit
88b7e7ca03
@ -8,7 +8,7 @@ services:
|
||||
- SYS_PTRACE
|
||||
command: [
|
||||
"./btcd",
|
||||
"--testnet",
|
||||
"--devnet",
|
||||
"--addrindex",
|
||||
# "--generate",
|
||||
"--nodnsseed",
|
||||
@ -30,7 +30,7 @@ services:
|
||||
- SYS_PTRACE
|
||||
command: [
|
||||
"./btcd",
|
||||
"--testnet",
|
||||
"--devnet",
|
||||
"--addrindex",
|
||||
"--connect=first",
|
||||
"--rpcuser=user",
|
||||
@ -58,7 +58,7 @@ services:
|
||||
"./btcd",
|
||||
"--",
|
||||
# here starts btcd parameters
|
||||
"--testnet",
|
||||
"--devnet",
|
||||
"--addrindex",
|
||||
"--connect=first",
|
||||
"--rpcuser=user",
|
||||
|
24
run-dev.sh
24
run-dev.sh
@ -9,19 +9,19 @@ set -e
|
||||
if [[ $* == *--help* ]]
|
||||
then
|
||||
echo "Usage:"
|
||||
echo -e "\t./run-def.sh [--rm] [--debug]"
|
||||
echo -e "\t./run-dev.sh [--rm] [--debug]"
|
||||
echo ""
|
||||
echo -e "\t--rm\t\tRemove dockers prior to running them, to clear data"
|
||||
echo -e "\t--debug\t\tEnable debugging on second server. Server will not start until debugger is attached"
|
||||
echo -e "\t--no-build\t\tRun without building docker images"
|
||||
echo -e "\t--only-build\t\tBuild docker images without running"
|
||||
echo -e "\t--no-run\t\tBuild docker images without running"
|
||||
echo -e "\t--cleanup\t\tAlias for --rm --no-run --no-build. Overrides all other flags"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $* == *--no-build* ]] && [[ $* == *--only-build* ]]
|
||||
if [[ $* == *--cleanup* ]]
|
||||
then
|
||||
echo "--no-build and --only-build may not be passed together"
|
||||
exit
|
||||
set -- "--rm --no-run --no-build"
|
||||
fi
|
||||
|
||||
export SERVICE_NAME=btcd
|
||||
@ -35,15 +35,15 @@ then
|
||||
docker tag "${SERVICE_NAME}:${GIT_COMMIT}" "${SERVICE_NAME}:latest"
|
||||
fi
|
||||
|
||||
if [[ $* != *--only-build* ]]
|
||||
cd docker
|
||||
|
||||
if [[ $* == *--rm* ]]
|
||||
then
|
||||
cd docker
|
||||
|
||||
if [[ $* == *--rm* ]]
|
||||
then
|
||||
docker-compose rm -f -s -v
|
||||
fi
|
||||
docker-compose rm -f -s -v
|
||||
fi
|
||||
|
||||
if [[ $* != *--no-run* ]]
|
||||
then
|
||||
if [[ $* == *--debug* ]]
|
||||
then
|
||||
docker-compose up first second-debug
|
||||
|
Loading…
x
Reference in New Issue
Block a user