From 2f988795c4de69251f672af5da2917090c1e397d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 27 Apr 2020 01:08:36 +0200 Subject: [PATCH] I believe it's much simpler to just copypasta the code from bin/setup into the install script --- scripts/install | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0886114..5b62179 100644 --- a/scripts/install +++ b/scripts/install @@ -108,7 +108,21 @@ cp ../conf/.sequelizerc.example "$final_path"/.sequelizerc ynh_script_progression --message="Building application... (this may take some time and resources!)" pushd "$final_path" || exit -./bin/setup + +# ---- This is copypasta from https://raw.githubusercontent.com/codimd/server/master/bin/setup +if [ ! -f config.json ]; then + cp config.json.example config.json +fi + +if [ ! -f .sequelizerc ]; then + cp .sequelizerc.example .sequelizerc +fi + +yarn install +yarn install --production=false # FIXME: this doesn't sounds like what we want to have for a real deployment ? idk +# ---- End copypasta from https://raw.githubusercontent.com/codimd/server/master/bin/setup + + yarn run build #node_modules/.bin/sequelize db:migrate popd || exit