From 3f4bea9edd2700a20045c69727976d953b907ff3 Mon Sep 17 00:00:00 2001 From: librelois <elois@ifee.fr> Date: Thu, 30 Apr 2020 17:47:44 +0200 Subject: [PATCH] [build] create bash script to build rust code & build in debug on dev --- neon/build.sh | 12 ++++++++++++ neon/native/artifacts.json | 2 +- package.json | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 neon/build.sh diff --git a/neon/build.sh b/neon/build.sh new file mode 100755 index 000000000..f12cd426d --- /dev/null +++ b/neon/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +cd neon + +if [ "${NODE_ENV}" = "production" ] +then + neon build --release +else + neon build +fi + +cd .. \ No newline at end of file diff --git a/neon/native/artifacts.json b/neon/native/artifacts.json index 3f346e098..837b6fb09 100644 --- a/neon/native/artifacts.json +++ b/neon/native/artifacts.json @@ -1 +1 @@ -{"active":"release","targets":{"debug":{"rustc":"","env":{"npm_config_target":null,"npm_config_arch":null,"npm_config_target_arch":null,"npm_config_disturl":null,"npm_config_runtime":null,"npm_config_build_from_source":null,"npm_config_devdir":null}},"release":{"rustc":"","env":{"npm_config_target":null,"npm_config_arch":null,"npm_config_target_arch":null,"npm_config_disturl":null,"npm_config_runtime":null,"npm_config_build_from_source":null,"npm_config_devdir":null}}}} \ No newline at end of file +{"active":"debug","targets":{"debug":{"rustc":"","env":{"npm_config_target":null,"npm_config_arch":null,"npm_config_target_arch":null,"npm_config_disturl":null,"npm_config_runtime":null,"npm_config_build_from_source":null,"npm_config_devdir":null}},"release":{"rustc":"","env":{"npm_config_target":null,"npm_config_arch":null,"npm_config_target_arch":null,"npm_config_disturl":null,"npm_config_runtime":null,"npm_config_build_from_source":null,"npm_config_devdir":null}}}} \ No newline at end of file diff --git a/package.json b/package.json index b73e9bf37..bb61389a3 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,8 @@ "doc": "typedoc --out typedoc/ index.ts app/ --mode file --readme README.md --includeDeclarations --sourcefile-url-prefix \"https://git.duniter.org/nodes/typescript/duniter/blob/loki/\"", "test": "nyc --reporter html mocha", "start": "node bin/duniter start", - "build": "cd neon && neon build --release && cd.. && tsc && cd \"../node_modules/duniter-ui\" && npm install && npm run build", - "install": "cd neon && neon build --release", + "build": "./neon/build.sh && cd.. && tsc && cd \"../node_modules/duniter-ui\" && npm install && npm run build", + "install": "./neon/build.sh", "lint": "lint-staged", "prettier": "prettier --write app/**/*/*.ts", "reformat": "eslint --cache --fix app/**/*/*.ts", -- GitLab