From f1ad2f1648aa5f5a721de802a991e40002363f0c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 05:28:53 +0100 Subject: [PATCH] Adding Yarn --- scripts/install | 5 ++++- scripts/remove | 3 ++- scripts/restore | 6 ++++-- scripts/upgrade | 5 ++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 58f63c7..7d84ce7 100644 --- a/scripts/install +++ b/scripts/install @@ -97,10 +97,13 @@ 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 -#ynh_install_app_dependencies deb1 deb2 +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 + #================================================= # CREATE A MYSQL DATABASE #================================================= diff --git a/scripts/remove b/scripts/remove index c306303..529f5ef 100644 --- a/scripts/remove +++ b/scripts/remove @@ -46,9 +46,10 @@ ynh_remove_systemd_config #================================================= # Remove metapackage and its dependencies -#ynh_remove_app_dependencies ynh_use_nodejs ynh_remove_nodejs +ynh_remove_app_dependencies +rm -rf "/etc/apt/sources.list.d/yarn.list" #================================================= # REMOVE THE MYSQL DATABASE diff --git a/scripts/restore b/scripts/restore index 9b16496..c12dd0e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,11 +92,13 @@ chown -R $app:$app /var/log/$app # REINSTALL DEPENDENCIES #================================================= -# Define and install dependencies -#ynh_install_app_dependencies deb1 deb2 +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 + #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4f3d7d9..3e795f1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,10 +101,13 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= -#ynh_install_app_dependencies deb1 deb2 +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 + #================================================= # CREATE DEDICATED USER #=================================================