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 to v1.8.0

This commit is contained in:
maniack 2019-12-30 20:01:19 +01:00
parent 2bd8f440ae
commit c83b418957
9 changed files with 37 additions and 15 deletions

View file

@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
Etherpad is a highly customizable Open Source online editor providing collaborative editing in really real-time.
This package will install the same plugins than [Framapad](https://framapad.org/).
**Shipped version:** 1.7.5
**Shipped version:** 1.8.0
## Screenshots

View file

@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst
Etherpad est un éditeur en ligne Open Source hautement personnalisable qui permet l'édition collaborative en temps réel.
Ce paquet installera les mêmes plugins que [Framapad](https://framapad.org/).
**Version embarquée:** 1.7.5
**Version embarquée:** 1.8.0
## Captures d'écran

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.7.5.tar.gz
SOURCE_SUM=01971447ff7b4d0d2af52faf02edb032
SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.0.tar.gz
SOURCE_SUM=f5fc307e4206b1db13d12833024968bc
SOURCE_SUM_PRG=md5sum
ARCH_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "Framapad clone, a online editor providing collaborative editing in real-time.",
"fr": "Clone de Framapad, un éditeur en ligne fournissant l'édition collaborative en temps réel."
},
"version": "1.7.5~ynh3",
"version": "1.8.0~ynh1",
"url": "https://framapad.org",
"license": "Apache-2.0",
"maintainer": {

View file

@ -361,3 +361,18 @@ ynh_maintenance_mode_OFF () {
systemctl reload nginx
}
#=================================================
# Execute a command as another user
# usage: ynh_exec_as USER COMMAND [ARG ...]
ynh_exec_as() {
local USER=$1
shift 1
if [[ $USER = $(whoami) ]]; then
eval "$@"
else
sudo -u "$USER" "$@"
fi
}

View file

@ -7,7 +7,7 @@ abiword_app_depencencies="abiword"
libreoffice_app_dependencies="unoconv libreoffice-writer"
# NodeJS version
nodejs_version=6
nodejs_version=10
# Mypads version
# This variable is mostly used to force an upgrade of the package in case of new versions of mypads.

View file

@ -162,8 +162,15 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90
# Install dependencies and proceed to the installation
ynh_use_nodejs
"$final_path/bin/installDeps.sh" > $install_log 2>&1 || ( ynh_exec_err cat "$install_log"; false )
npm install forever -g >> $install_log 2>&1 || ( ynh_exec_err cat "$install_log"; false )
(
cd "$final_path"
mkdir -p node_modules
cd node_modules
[ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite
cd ep_etherpad-lite
chown -R $app: $final_path
ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --save --loglevel warn
)
#=================================================
# CONFIGURE ETHERPAD

View file

@ -127,8 +127,7 @@ ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_script_progression --message="Reinstalling Etherpad node dependencies..." --weight=17
ynh_use_nodejs
npm cache clean
npm install forever -g >> $install_log 2>&1
ynh_exec_warn_less npm cache clean --force
#=================================================
# RESTORE USER RIGHTS

View file

@ -220,17 +220,18 @@ ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_script_progression --message="Upgrading Etherpad npm modules..." --weight=60
# Update the main modules of etherpad
chown -R $app: $final_path
(cd "$final_path/src"
npm cache clean
ynh_exec_warn_less npm update)
ynh_exec_warn_less npm cache clean --force
ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" update)
# Then update the additionnal modules
(cd "$final_path"
npm cache clean
ynh_exec_warn_less npm cache clean --force
while read node_module
do
echo "Update $node_module"
ynh_exec_warn_less npm install --upgrade $node_module || true
echo "Update $node_module"
ynh_exec_warn_less ynh_exec_as $app PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --upgrade $node_module || true
done <<< "$(ls -1 "$final_path/node_modules" | grep "^ep_")")
#=================================================