skip downloading the daemon if it exists and the version matches
This commit is contained in:
parent
23601a3e48
commit
9b6ae50c51
2 changed files with 12 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@
|
||||||
/app/dist
|
/app/dist
|
||||||
/app/node_modules
|
/app/node_modules
|
||||||
/build/venv
|
/build/venv
|
||||||
|
/build/daemon.ver
|
||||||
/lbry-app-venv
|
/lbry-app-venv
|
||||||
/lbry-app
|
/lbry-app
|
||||||
/lbry-venv
|
/lbry-venv
|
||||||
|
|
|
@ -82,9 +82,17 @@ fi
|
||||||
DAEMON_VER=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonVersion)")
|
DAEMON_VER=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonVersion)")
|
||||||
DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)")
|
DAEMON_URL_TEMPLATE=$(node -e "console.log(require(\"$ROOT/app/package.json\").lbrySettings.lbrynetDaemonUrlTemplate)")
|
||||||
DAEMON_URL=$(echo ${DAEMON_URL_TEMPLATE//DAEMONVER/$DAEMON_VER} | sed "s/OSNAME/$OSNAME/g")
|
DAEMON_URL=$(echo ${DAEMON_URL_TEMPLATE//DAEMONVER/$DAEMON_VER} | sed "s/OSNAME/$OSNAME/g")
|
||||||
wget --quiet "$DAEMON_URL" -O "$BUILD_DIR/daemon.zip"
|
DAEMON_VER_PATH="$BUILD_DIR/daemon.ver"
|
||||||
unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/app/dist/"
|
echo "$DAEMON_VER_PATH"
|
||||||
rm "$BUILD_DIR/daemon.zip"
|
if [[ ! -f $DAEMON_VER_PATH || ! -f $ROOT/app/dist/lbrynet-daemon || $(< $DAEMON_VER_PATH) != $DAEMON_VER ]]; then
|
||||||
|
wget --quiet "$DAEMON_URL" -O "$BUILD_DIR/daemon.zip"
|
||||||
|
unzip "$BUILD_DIR/daemon.zip" -d "$ROOT/app/dist/"
|
||||||
|
rm "$BUILD_DIR/daemon.zip"
|
||||||
|
echo "$DAEMON_VER" > "$DAEMON_VER_PATH"
|
||||||
|
else
|
||||||
|
echo "Already have daemon version $DAEMON_VER, skipping download"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue