1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wikijs_ynh.git synced 2024-09-03 20:36:09 +02:00

Force 2.0.0-beta.17

This commit is contained in:
yalh76 2019-02-03 02:40:30 +01:00
parent 61525ea667
commit 07640c6685
4 changed files with 33 additions and 10 deletions

View file

@ -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

View file

@ -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": {

View file

@ -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

View file

@ -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"