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

removing Yarn

This commit is contained in:
yalh76 2019-02-03 06:18:53 +01:00
parent fb2c47df7a
commit 6b3702be4c
4 changed files with 9 additions and 18 deletions

View file

@ -16,6 +16,7 @@ source /usr/share/yunohost/helpers
ynh_clean_setup () {
### Remove this function if there's nothing to clean before calling the remove script.
read -p "Press any key..."
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
@ -97,12 +98,9 @@ ynh_app_setting_set $app port $port
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
ynh_install_nodejs 8
ynh_install_app_dependencies yarn
#ynh_install_app_dependencies
#=================================================
# CREATE A MYSQL DATABASE
@ -190,9 +188,9 @@ mkdir -p "$final_path/db"
chown -R "$app":"$app" "$final_path"
pushd $final_path
ynh_use_nodejs
sudo -u $app env PATH=$PATH:$nodejs_path yarn add hoek@^4.2.1 --save --production
sudo -u $app env PATH=$PATH:$nodejs_path yarn add ts-node --save --production
sudo -u $app env PATH=$PATH:$nodejs_path yarn install --production
sudo -u $app env PATH=$PATH:$nodejs_path npm add hoek@^4.2.1 --save --production
sudo -u $app env PATH=$PATH:$nodejs_path npm add ts-node --save --production
sudo -u $app env PATH=$PATH:$nodejs_path npm install --production
popd
#=================================================

View file

@ -49,7 +49,6 @@ ynh_remove_systemd_config
ynh_use_nodejs
ynh_remove_nodejs
ynh_remove_app_dependencies
rm -rf "/etc/apt/sources.list.d/yarn.list"
#=================================================
# REMOVE THE MYSQL DATABASE

View file

@ -92,12 +92,9 @@ chown -R $app:$app /var/log/$app
# REINSTALL DEPENDENCIES
#=================================================
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
ynh_install_nodejs 8
ynh_install_app_dependencies yarn
#ynh_install_app_dependencies
#=================================================
# RESTORE SYSTEMD

View file

@ -101,12 +101,9 @@ ynh_add_nginx_config
# UPGRADE DEPENDENCIES
#=================================================
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
ynh_install_nodejs 8
ynh_install_app_dependencies yarn
#ynh_install_app_dependencies
#=================================================
# CREATE DEDICATED USER
@ -139,8 +136,8 @@ mkdir -p "$final_path/db"
chown -R "$app":"$app" "$final_path"
pushd $final_path
ynh_use_nodejs
sudo -u $app env PATH=$PATH:$nodejs_path yarn update --production
sudo -u $app env PATH=$PATH:$nodejs_path yarn install --production
sudo -u $app env PATH=$PATH:$nodejs_path npm update --production
sudo -u $app env PATH=$PATH:$nodejs_path npm install --production
popd
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.