1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-03-22 19:05:01 +01:00
parent 862cd0e753
commit f32f00f7a3
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -218,30 +218,26 @@ ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================
ynh_script_progression --message="Upgrading Etherpad npm modules..." --weight=60 ynh_script_progression --message="Upgrading Etherpad npm modules..." --weight=60
# Update the main modules of etherpad # # Update the main modules of etherpad
chown -R $app: $final_path # chown -R $app: $final_path
(cd "$final_path/src" # (cd "$final_path/src"
ynh_exec_warn_less npm cache clean --force # ynh_exec_warn_less npm cache clean --force
# Remove package-lock.json to prevent any shit during npm update... # # Remove package-lock.json to prevent any shit during npm update...
ynh_secure_remove --file="$final_path/src/package-lock.json" # ynh_secure_remove --file="$final_path/src/package-lock.json"
ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" update) # ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" update)
pushd $final_path # pushd $final_path
ynh_use_nodejs # ynh_use_nodejs
ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh # ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh
#ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
#ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade # popd
ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_automatic_logut ep_countable ep_delete_empty_pads ep_subscript_and_superscript ep_headings2 ep_author_hover ep_markdown ep_comments_page ep_align ep_font_color ep_font_size ep_spellcheck ep_table_of_contents >> $install_log 2>&1
if [ $mypads -eq 1 ]; then
# Framapad - Groups and private pads for Etherpad
ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_mypads >> $install_log 2>&1
fi
popd
# Then update the additionnal modules # Then update the additionnal modules
(cd "$final_path" pushd $final_path
ynh_use_nodejs
ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh
#ynh_exec_warn_less npm cache clean --force #ynh_exec_warn_less npm cache clean --force
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
while read node_module while read node_module
@ -262,7 +258,8 @@ do
module_version=@${module_version} module_version=@${module_version}
fi fi
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade ${node_module}${module_version} || true ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade ${node_module}${module_version} || true
done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")") done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")"
popd
# ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --upgrade ${node_module}${module_version} || true # ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --upgrade ${node_module}${module_version} || true
# done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")") # done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")")