Removing Yarn

This commit is contained in:
yalh76 2019-02-03 06:18:30 +01:00
parent bc165af31a
commit c7f849621c
4 changed files with 6 additions and 14 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 10
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
#=================================================
# CREATE A POSTGRESQL DATABASE
@ -192,7 +190,7 @@ chown -R "$app":"$app" "$final_path"
pushd $final_path
ynh_use_nodejs
sudo -u $app env PATH=$PATH:$nodejs_path yarn install
sudo -u $app env PATH=$PATH:$nodejs_path npm install
sudo -u $app env PATH=$PATH:$nodejs_path npm run build
popd

View File

@ -57,7 +57,6 @@ ynh_psql_remove_db "$db_name" "$db_name"
ynh_remove_app_dependencies
ynh_use_nodejs
ynh_remove_nodejs
rm -rf "/etc/apt/sources.list.d/yarn.list"
#=================================================
# REMOVE APP MAIN DIR

View File

@ -92,12 +92,10 @@ chown -R "$app":"$app" "$final_path"
#=================================================
# Define and install 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 10
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
#=================================================
# RESTORE SYSTEMD

View File

@ -102,12 +102,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 10
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
#=================================================
# CREATE DEDICATED USER
@ -133,7 +130,7 @@ chown -R "$app":"$app" "$final_path"
pushd $final_path
ynh_use_nodejs
sudo -u $app env PATH=$PATH:$nodejs_path yarn install
sudo -u $app env PATH=$PATH:$nodejs_path npm install
sudo -u $app env PATH=$PATH:$nodejs_path npm run build
popd