diff --git a/README.md b/README.md index 6afb824..4631eb7 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.11 +**Shipped version:** 2.0.0-beta.17 ## Licence diff --git a/manifest.json b/manifest.json index 1aa8d07..ca8cffa 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.11~ynh1", + "version": "2.0.0-beta.17~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 7283b44..01b5246 100644 --- a/scripts/install +++ b/scripts/install @@ -133,6 +133,10 @@ ynh_app_setting_set $app final_path $final_path #ynh_setup_source "$final_path" git clone https://github.com/Requarks/wiki "$final_path" +pushd $final_path + git checkout 2.0.0-beta.17 +popd + #================================================= # NGINX CONFIGURATION #================================================= @@ -184,11 +188,11 @@ 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.1" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" - sudo -u $app env PATH=$PATH:$nodejs_path npm install + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" --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 "eslint@>=5.0.0" --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 npm run build popd diff --git a/scripts/upgrade b/scripts/upgrade index ede61ab..8bb9440 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -85,7 +85,11 @@ path_url=$(ynh_normalize_url_path $path_url) # Download, check integrity, uncompress and patch the source from app.src #ynh_setup_source "$final_path" -( cd $final_path && git pull ) + +pushd $final_path + git pull + git checkout 2.0.0-beta.17 +popd #================================================= # NGINX CONFIGURATION @@ -125,12 +129,27 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm update - sudo -u $app env PATH=$PATH:$nodejs_path npm install + 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 npm run build popd + +#================================================= +# MODIFY A CONFIG FILE +#================================================= + +cp -f ../conf/config.sample.yml "$final_path/config.yml" + +### `ynh_replace_string` is used to replace a string in a file. +### (It's compatible with sed regular expressions syntax) + +#ynh_replace_string "match_string" "replace_string" "$final_path/config.yml" +ynh_replace_string "__PORT__" "$port" "$final_path/config.yml" +ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/config.yml" +ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/config.yml" + ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different "$final_path/config.yml"