1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

Specify homedir and yarnrc file for yarn commands

This commit is contained in:
tituspijean 2022-08-14 17:17:17 +02:00
parent d9efcf7942
commit 02aa33e51a
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 15 additions and 7 deletions

View file

@ -126,6 +126,10 @@ ynh_add_config --template="../conf/config.production.json" --destination="$final
chmod 400 "$final_path/ghost/core/config.production.json"
chown $app:$app "$final_path/ghost/core/config.production.json"
touch "$final_path/.yarnrc.yml"
chmod 400 "$final_path/.yarnrc.yml"
chown $app:$app "$final_path/.yarnrc.yml"
#==============================================
# BUILD GHOST
#==============================================
@ -134,9 +138,9 @@ ynh_script_progression --message="Building Ghost... (this will take some time an
pushd "$final_path"
ynh_use_nodejs
# Longer network timeouts for slow systems; see https://github.com/yarnpkg/yarn/issues/8242
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn config set network-timeout 600000
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn setup # catch-all command provided by Ghost that handles all the setup
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn config set network-timeout 600000
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn setup # catch-all command provided by Ghost that handles all the setup
popd
#=================================================

View file

@ -167,6 +167,10 @@ ynh_add_config --template="../conf/config.production.json" --destination="$final
chmod 400 "$final_path/ghost/core/config.production.json"
chown $app:$app "$final_path/ghost/core/config.production.json"
touch "$final_path/.yarnrc.yml"
chmod 400 "$final_path/.yarnrc.yml"
chown $app:$app "$final_path/.yarnrc.yml"
#==============================================
# BUILD GHOST
#==============================================
@ -177,10 +181,10 @@ then
pushd "$final_path"
# Longer network timeouts for slow systems; see https://github.com/yarnpkg/yarn/issues/8242
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn config set network-timeout 600000
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install --non-interactive
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn setup
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn config set network-timeout 600000
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn install --non-interactive
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn setup
popd
fi