From 7e63558346cc52b5c4f1b88f1f673bb8c6ae722d Mon Sep 17 00:00:00 2001 From: meliurwen Date: Mon, 20 Sep 2021 17:33:00 +0200 Subject: [PATCH] Updated build --- Dockerfile | 2 +- launch.sh | 0 src/build.npm.sh | 16 ++++++++++++++++ src/build.sh | 15 +++++++++++++-- src/install.npm.thirdparty.sh | 12 ++++++++++++ 5 files changed, 42 insertions(+), 3 deletions(-) mode change 100644 => 100755 launch.sh create mode 100755 src/build.npm.sh create mode 100755 src/install.npm.thirdparty.sh diff --git a/Dockerfile b/Dockerfile index 4c85e24..e2c0b64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ WORKDIR /srv/build VOLUME ["/srv/build/repo/incoming"] -ENTRYPOINT ["./main.sh"] +ENTRYPOINT ["./main.sh", "master"] diff --git a/launch.sh b/launch.sh old mode 100644 new mode 100755 diff --git a/src/build.npm.sh b/src/build.npm.sh new file mode 100755 index 0000000..47e6f74 --- /dev/null +++ b/src/build.npm.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +apt-get update +apt-get -qq -y --no-install-recommends install curl jq ca-certificates git g++ gcc make clang wget xz-utils python3 sudo +mkdir build_node +cd build_node/ || exit +wget https://nodejs.org/dist/v16.9.1/node-v16.9.1.tar.xz +tar xf node-v16.9.1.tar.xz +mv node-v16.9.1 node +cd node || exit +./configure +make -j4 +make install +node --version diff --git a/src/build.sh b/src/build.sh index c935040..7e56999 100755 --- a/src/build.sh +++ b/src/build.sh @@ -2,14 +2,25 @@ set -e +#echo "Installing build dependencies (third party)..." +#./install.npm.thirdparty.sh + +echo "Installing build dependencies (npm official source)..." +./build.npm.sh + cd project -echo "Installing build dependencies (apt)..." -apt-get -qq -y --no-install-recommends install npm cargo > /dev/null +#echo "Installing build dependencies (apt)..." +#apt-get -qq -y --no-install-recommends install npm cargo > /dev/null + echo "Installing build dependencies (npm)..." npm install echo "Build dependencies installed." +echo "Installing packaging dependencies..." +apt-get -qq -y --no-install-recommends install binutils > /dev/null +echo "Packaging dependencies installed." + echo "Building the app..." NODE_ENV=production npm run build NO_ASAR=true npm run pack:generate_config diff --git a/src/install.npm.thirdparty.sh b/src/install.npm.thirdparty.sh new file mode 100755 index 0000000..82c4cf7 --- /dev/null +++ b/src/install.npm.thirdparty.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +apt-get update +apt-get -qq -y --no-install-recommends install curl wget ca-certificates sudo + +curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - + +apt-get -qq -y install nodejs + +node --version