mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
Specify homedir and yarnrc file for yarn commands
This commit is contained in:
parent
36e908d8cf
commit
0263d9d5c8
2 changed files with 12 additions and 4 deletions
|
@ -160,10 +160,14 @@ chown -R $app:www-data "$datadir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building Yarn dependencies..."
|
||||
|
||||
touch "$final_path/.yarnrc.yml"
|
||||
chmod 400 "$final_path/.yarnrc.yml"
|
||||
chown $app:$app "$final_path/.yarnrc.yml"
|
||||
|
||||
pushd "$final_path"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn install --production --pure-lockfile
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn cache clean
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -235,10 +235,14 @@ chown -R $app:www-data "$datadir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building Yarn dependencies..."
|
||||
|
||||
touch "$final_path/.yarnrc.yml"
|
||||
chmod 400 "$final_path/.yarnrc.yml"
|
||||
chown $app:$app "$final_path/.yarnrc.yml"
|
||||
|
||||
pushd "$final_path"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn install --production --pure-lockfile
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn cache clean
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue