Skip to content

Commit a16dd82

Browse files
humaitehumaite
authored and
humaite
committed
Arweave Should Not Build Before Being Stopped
This commit fixes an issue related to `./bin/stop` script and `./bin/arweave.env`. When stopping Arweave application in dev environment, a full release is always created. It is not clean and could probably leads to errors (even if was not the case previously). If `SKIP_BUILD` variable is defined then arweave is not compiled.
1 parent d76dc6b commit a16dd82

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

bin/arweave.env

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ else
1818
# extended start script to run from our current directory (which is necessary for relative
1919
# paths to work correctly and not be relative to the rebar3 _build release directory)
2020
echo Building dependencies for target ${ARWEAVE_BUILD_TARGET:-default}...
21-
(cd ${PARENT_DIR} && ./ar-rebar3 ${ARWEAVE_BUILD_TARGET:-default} release)
21+
22+
# sometimes, arweave does not to be build, for example
23+
# when someone is stopping a node.
24+
if ! [ "${SKIP_BUILD}" ]; then
25+
(cd ${PARENT_DIR} && ./ar-rebar3 ${ARWEAVE_BUILD_TARGET:-default} release)
26+
fi
27+
2228
export ARWEAVE="${SCRIPT_DIR}/arweave-dev"
2329
export ARWEAVE_COMMAND="console"
2430
fi

bin/start

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -e
44

55
SCRIPT_DIR="$(dirname "$0")"
6+
SCRIPT_ACTION="start"
67

78
# Sets $ARWEAVE and $ARWEAVE_* variables
89
source $SCRIPT_DIR/arweave.env

bin/stop

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
set -e
44

55
SCRIPT_DIR="$(dirname "$0")"
6+
SCRIPT_ACTION="stop"
67

78
# Sets $ARWEAVE and $ARWEAVE_* variables
9+
SKIP_BUILD=yes
810
source $SCRIPT_DIR/arweave.env
911

10-
$ARWEAVE stop
12+
$ARWEAVE stop

0 commit comments

Comments
 (0)