diff --git a/README.md b/README.md index 0f65d98..1254395 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.15 +**Shipped version:** 2.0.0-beta ## Licence diff --git a/manifest.json b/manifest.json index efac860..ddb102d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.15~ynh1", + "version": "2.0.0-beta~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index a4fe2cb..4adeb69 100644 --- a/scripts/install +++ b/scripts/install @@ -97,9 +97,14 @@ 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 redis-server postgresql postgresql-contrib ynh_install_nodejs 10 +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_app_dependencies redis-server postgresql postgresql-contrib yarn + + #================================================= # CREATE A POSTGRESQL DATABASE #================================================= @@ -134,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout 2.0.0-beta.15 + git checkout popd #================================================= @@ -188,11 +193,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install --production - sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/remove b/scripts/remove index 9f2ab84..d49e468 100644 --- a/scripts/remove +++ b/scripts/remove @@ -57,6 +57,7 @@ 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 diff --git a/scripts/restore b/scripts/restore index 24408ab..804658a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,9 +92,13 @@ chown -R "$app":"$app" "$final_path" #================================================= # Define and install dependencies -ynh_install_app_dependencies redis-server postgresql postgresql-contrib ynh_install_nodejs 10 +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_app_dependencies redis-server postgresql postgresql-contrib yarn + #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index dd3e2d6..29d1780 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout 2.0.0-beta.15 + git checkout popd #================================================= @@ -102,9 +102,13 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= -ynh_install_app_dependencies redis-server postgresql postgresql-contrib ynh_install_nodejs 10 +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_app_dependencies redis-server postgresql postgresql-contrib yarn + #================================================= # CREATE DEDICATED USER #================================================= @@ -129,9 +133,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm update --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install --production - sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd