mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Force module versions
This commit is contained in:
parent
f6a4fd1a94
commit
22dcead3c1
4 changed files with 46 additions and 16 deletions
|
@ -12,3 +12,19 @@ nodejs_version=10
|
||||||
# Mypads version
|
# Mypads version
|
||||||
# This variable is mostly used to force an upgrade of the package in case of new versions of mypads.
|
# This variable is mostly used to force an upgrade of the package in case of new versions of mypads.
|
||||||
mypads_version=1.7.10
|
mypads_version=1.7.10
|
||||||
|
|
||||||
|
# Plugin versions
|
||||||
|
ep_align_version=0.2.0
|
||||||
|
ep_author_hover_version=0.2.1
|
||||||
|
ep_automatic_logut_version=1.0.8
|
||||||
|
ep_comments_page_version=0.0.35
|
||||||
|
ep_countable_version=0.0.7
|
||||||
|
ep_delete_empty_pads_version=0.0.6
|
||||||
|
ep_font_color_version=0.0.11
|
||||||
|
ep_headings2_version=0.1.3
|
||||||
|
ep_markdown_version=0.1.7
|
||||||
|
ep_page_view_version=0.5.24
|
||||||
|
ep_spellcheck_version=0.0.7
|
||||||
|
ep_subscript_and_superscript_version=0.0.3
|
||||||
|
ep_table_of_contents_version=0.1.15
|
||||||
|
ep_user_font_size_version=0.0.1
|
||||||
|
|
|
@ -236,7 +236,7 @@ apply_config() {
|
||||||
npm uninstall ep_automatic_logut
|
npm uninstall ep_automatic_logut
|
||||||
else
|
else
|
||||||
ynh_replace_string --match_string="^\/\/\(.*\"automatic_logut.*$\)" --replace_string="\1" --target_file="$config_file"
|
ynh_replace_string --match_string="^\/\/\(.*\"automatic_logut.*$\)" --replace_string="\1" --target_file="$config_file"
|
||||||
npm install ep_automatic_logut
|
npm install ep_automatic_logut@${ep_automatic_logut_version}
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
chown -R $app: $final_path/node_modules
|
chown -R $app: $final_path/node_modules
|
||||||
|
|
|
@ -242,37 +242,37 @@ ynh_script_progression --message="Installing Etherpad plugins..." --weight=90
|
||||||
|
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
# Add Left/Center/Right/Justify to lines of text in a pad
|
# Add Left/Center/Right/Justify to lines of text in a pad
|
||||||
npm install ep_align >> $install_log 2>&1
|
npm install ep_align@${ep_align_version} >> $install_log 2>&1
|
||||||
# Framapad - Adds author names to span titles
|
# Framapad - Adds author names to span titles
|
||||||
npm install ep_author_hover >> $install_log 2>&1
|
npm install ep_author_hover@${ep_author_hover_version} >> $install_log 2>&1
|
||||||
# Automatically disconnects user after some period of time (Prevent server overload)
|
# Automatically disconnects user after some period of time (Prevent server overload)
|
||||||
npm install ep_automatic_logut >> $install_log 2>&1
|
npm install ep_automatic_logut@${ep_automatic_logut_version} >> $install_log 2>&1
|
||||||
# Framapad - Adds comments on sidebar and link it to the text.
|
# Framapad - Adds comments on sidebar and link it to the text.
|
||||||
npm install ep_comments_page >> $install_log 2>&1
|
npm install ep_comments_page@${ep_comments_page_version} >> $install_log 2>&1
|
||||||
# Framapad - Displays paragraphs, sentences, words and characters counts.
|
# Framapad - Displays paragraphs, sentences, words and characters counts.
|
||||||
npm install ep_countable >> $install_log 2>&1
|
npm install ep_countable@${ep_countable_version} >> $install_log 2>&1
|
||||||
# Framapad - Delete pads which were never edited
|
# Framapad - Delete pads which were never edited
|
||||||
npm install ep_delete_empty_pads >> $install_log 2>&1
|
npm install ep_delete_empty_pads@${ep_delete_empty_pads_version} >> $install_log 2>&1
|
||||||
# Framapad - Apply colors to fonts
|
# Framapad - Apply colors to fonts
|
||||||
npm install ep_font_color >> $install_log 2>&1
|
npm install ep_font_color@${ep_font_color_version} >> $install_log 2>&1
|
||||||
# Framapad - Adds heading support to Etherpad Lite.
|
# Framapad - Adds heading support to Etherpad Lite.
|
||||||
npm install ep_headings2 >> $install_log 2>&1
|
npm install ep_headings2@${ep_headings2_version} >> $install_log 2>&1
|
||||||
# Framapad - Edit and Export as Markdown in Etherpad
|
# Framapad - Edit and Export as Markdown in Etherpad
|
||||||
npm install ep_markdown >> $install_log 2>&1
|
npm install ep_markdown@${ep_markdown_version} >> $install_log 2>&1
|
||||||
if [ $mypads -eq 1 ]; then
|
if [ $mypads -eq 1 ]; then
|
||||||
# Framapad - Groups and private pads for etherpad
|
# Framapad - Groups and private pads for etherpad
|
||||||
npm install ep_mypads@${mypads_version} >> $install_log 2>&1
|
npm install ep_mypads@${mypads_version} >> $install_log 2>&1
|
||||||
fi
|
fi
|
||||||
# Framapad - Add support to do 'page view', with a toggle on/off option in Settings, also Page Breaks with Control Enter
|
# Framapad - Add support to do 'page view', with a toggle on/off option in Settings, also Page Breaks with Control Enter
|
||||||
npm install ep_page_view >> $install_log 2>&1
|
npm install ep_page_view@${ep_page_view_version} >> $install_log 2>&1
|
||||||
# Framapad - Add support to do 'Spell checking'
|
# Framapad - Add support to do 'Spell checking'
|
||||||
npm install ep_spellcheck >> $install_log 2>&1
|
npm install ep_spellcheck@${ep_spellcheck_version} >> $install_log 2>&1
|
||||||
# Framapad - Add support for Subscript and Superscript
|
# Framapad - Add support for Subscript and Superscript
|
||||||
npm install ep_subscript_and_superscript >> $install_log 2>&1
|
npm install ep_subscript_and_superscript@${ep_subscript_and_superscript_version} >> $install_log 2>&1
|
||||||
# Framapad - View a table of contents for your pad
|
# Framapad - View a table of contents for your pad
|
||||||
npm install ep_table_of_contents >> $install_log 2>&1
|
npm install ep_table_of_contents@${ep_table_of_contents_version} >> $install_log 2>&1
|
||||||
# Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views
|
# Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views
|
||||||
npm install ep_user_font_size >> $install_log 2>&1
|
npm install ep_user_font_size@${ep_user_font_size_version} >> $install_log 2>&1
|
||||||
popd
|
popd
|
||||||
chown -R $app: $final_path/node_modules
|
chown -R $app: $final_path/node_modules
|
||||||
|
|
||||||
|
|
|
@ -234,8 +234,22 @@ ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm"
|
||||||
ynh_exec_warn_less npm cache clean --force
|
ynh_exec_warn_less npm cache clean --force
|
||||||
while read node_module
|
while read node_module
|
||||||
do
|
do
|
||||||
|
# Ignore ep_etherpad-lite, this part is updated before in this script.
|
||||||
|
if [ "$node_module" = "ep_etherpad-lite" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
echo "Update $node_module"
|
echo "Update $node_module"
|
||||||
ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --upgrade $node_module || true
|
# Build the name of the variable with the version.
|
||||||
|
module_version=${node_module}_version
|
||||||
|
# Get the content of the variable (from the file _variables)
|
||||||
|
module_version=${!module_version:-}
|
||||||
|
# If the module has no version stored in a variable into the file, keep it empty.
|
||||||
|
# That way, the upgrade will not be specific to a version.
|
||||||
|
## Otherwise, add @ before the version number to force the upgrade to this version.
|
||||||
|
if [ -n "${module_version}" ]; then
|
||||||
|
module_version=@${module_version}
|
||||||
|
fi
|
||||||
|
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_")")
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue