From f8c9a674e67a2ee4f5382ab1294b34a8c5738214 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Mon, 19 Jul 2021 11:23:34 +0300 Subject: [PATCH] fix build scripts --- build-all.sh | 7 ++----- docker-all.sh | 6 +----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/build-all.sh b/build-all.sh index 59ffa8a..1dca873 100755 --- a/build-all.sh +++ b/build-all.sh @@ -41,16 +41,13 @@ OUTPUT="${ROOT}/dist/TorrServer" #### Build web echo "Build web" -# cd "${ROOT}/web" || exit 1 -# npm install --silent -# cd "${ROOT}" -$GOBIN run gen_web.go || exit 1 +$GOBIN run gen_web.go #### Build server echo "Build server" cd "${ROOT}/server" || exit 1 $GOBIN clean -i -r -cache #--modcache -$GOBIN mod tidy -v +$GOBIN mod tidy $GOBIN mod download BUILD_FLAGS="-ldflags=${LDFLAGS}" diff --git a/docker-all.sh b/docker-all.sh index b2817c1..bfec677 100755 --- a/docker-all.sh +++ b/docker-all.sh @@ -4,11 +4,7 @@ ROOT=${PWD} #### Build web echo "Build web" -cd "${ROOT}/web" || exit 1 -npm install --silent -npm run --silent build-js -cp "${ROOT}/web/dest/index.html" "${ROOT}/server/web/pages/template/pages/" -cd .. +$GOBIN run gen_web.go sudo docker run --rm -v "$PWD":/usr/src/torr -w /usr/src/torr golang:1.16 ./build-all.sh sudo chmod 0777 ./dist/* \ No newline at end of file