mirror of
https://github.com/YunoHost-Apps/wikijs_ynh.git
synced 2024-09-03 20:36:09 +02:00
Removing Yarn
This commit is contained in:
parent
bc165af31a
commit
c7f849621c
4 changed files with 6 additions and 14 deletions
|
@ -16,6 +16,7 @@ source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
### Remove this function if there's nothing to clean before calling the remove script.
|
### Remove this function if there's nothing to clean before calling the remove script.
|
||||||
|
read -p "Press any key..."
|
||||||
ynh_clean_check_starting
|
ynh_clean_check_starting
|
||||||
}
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# 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
|
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
||||||
### - And the section "UPGRADE DEPENDENCIES" in the upgrade 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_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
|
# CREATE A POSTGRESQL DATABASE
|
||||||
|
@ -192,7 +190,7 @@ chown -R "$app":"$app" "$final_path"
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
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
|
sudo -u $app env PATH=$PATH:$nodejs_path npm run build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,6 @@ ynh_psql_remove_db "$db_name" "$db_name"
|
||||||
ynh_remove_app_dependencies
|
ynh_remove_app_dependencies
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_remove_nodejs
|
ynh_remove_nodejs
|
||||||
rm -rf "/etc/apt/sources.list.d/yarn.list"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
|
|
|
@ -92,12 +92,10 @@ chown -R "$app":"$app" "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Define and install dependencies
|
# 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_nodejs 10
|
||||||
|
|
||||||
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
|
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
|
|
@ -102,12 +102,9 @@ ynh_add_nginx_config
|
||||||
# UPGRADE DEPENDENCIES
|
# 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_nodejs 10
|
||||||
|
|
||||||
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
|
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
@ -133,7 +130,7 @@ chown -R "$app":"$app" "$final_path"
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
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
|
sudo -u $app env PATH=$PATH:$nodejs_path npm run build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue