Skip to content
Snippets Groups Projects
Commit 81ae6c21 authored by Éloïs's avatar Éloïs
Browse files

Merge branch 'feature/optimize-build-releases-by-compiling-rust-code-only-once' into dev

parents 73316b0b 112ccd44
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
cd neon cd neon
if [ "${NODE_ENV}" = "production" ] if [ "${NEON_BUILD_RELEASE}" = "true" ] || [ "${NODE_ENV}" = "production" ]
then then
neon build --release neon build --release
else else
......
...@@ -119,11 +119,11 @@ ...@@ -119,11 +119,11 @@
"@types/node": "13.9.8", "@types/node": "13.9.8",
"@types/should": "8.3.0", "@types/should": "8.3.0",
"@types/ws": "^5.1.2", "@types/ws": "^5.1.2",
"husky": ">=4",
"lint-staged": ">=10",
"coveralls": "3.0.11", "coveralls": "3.0.11",
"eslint": "6.8.0", "eslint": "6.8.0",
"eslint-plugin-mocha": "6.3.0", "eslint-plugin-mocha": "6.3.0",
"husky": ">=4",
"lint-staged": ">=10",
"mocha": "3.4.2", "mocha": "3.4.2",
"mocha-eslint": "0.1.7", "mocha-eslint": "0.1.7",
"nyc": "^11.0.3", "nyc": "^11.0.3",
......
...@@ -68,9 +68,12 @@ cd ${RELEASES}/duniter ...@@ -68,9 +68,12 @@ cd ${RELEASES}/duniter
echo "Copying Nodejs" echo "Copying Nodejs"
cp -R "$DOWNLOADS/node-${NVER}-linux-${ARCH}" node cp -R "$DOWNLOADS/node-${NVER}-linux-${ARCH}" node
yarn # Build Duniter with GUI
echo "Build Duniter with GUI..."
export NEON_BUILD_RELEASE="true"
yarn add "duniter-ui@${DUNITER_UI_VER}" || exit 1
yarn --production || exit 1
yarn add duniter-ui@1.7.x --production
SRC=`pwd` SRC=`pwd`
echo $SRC echo $SRC
......
...@@ -176,11 +176,9 @@ cp -r $(find "${ROOT}" -mindepth 1 -maxdepth 1 ! -name "${WORK_NAME}") "${RELEAS ...@@ -176,11 +176,9 @@ cp -r $(find "${ROOT}" -mindepth 1 -maxdepth 1 ! -name "${WORK_NAME}") "${RELEAS
cd "${RELEASES}/duniter" cd "${RELEASES}/duniter"
rm -Rf .gitignore .git || exit 1 # Remove git files rm -Rf .gitignore .git || exit 1 # Remove git files
# Build # Build Duniter with GUI
echo ">> VM: building modules..." echo ">> VM: building modules..."
yarn || exit 1 export NEON_BUILD_RELEASE="true"
# Duniter UI
yarn add "duniter-ui@${DUNITER_UI_VER}" || exit 1 yarn add "duniter-ui@${DUNITER_UI_VER}" || exit 1
yarn --production || exit 1 yarn --production || exit 1
......
...@@ -24,8 +24,9 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y ...@@ -24,8 +24,9 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# build duniter # build duniter
RUN export PATH="$HOME/.cargo/bin:$PATH" && \ RUN export PATH="$HOME/.cargo/bin:$PATH" && \
export RUSTFLAGS="-C target-feature=-crt-static" && \ export RUSTFLAGS="-C target-feature=-crt-static" && \
yarn install --production && \ export NEON_BUILD_RELEASE="true" && \
yarn add duniter-ui@${DUNITER_UI_VER} && \ yarn add duniter-ui@${DUNITER_UI_VER} && \
yarn --production && \
mv release/docker/duniter.sh docker.sh && \ mv release/docker/duniter.sh docker.sh && \
rm -rf coverage release test && \ rm -rf coverage release test && \
rm -rf target && \ rm -rf target && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment