mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
Merge pull request #150 from YunoHost-Apps/testing
Upgrade to 6.27.1~ynh1
This commit is contained in:
commit
9cac9713c9
12 changed files with 29 additions and 99 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +0,0 @@
|
||||||
*.swp
|
|
||||||
*.swo
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 6.27~ynh1
|
**Shipped version:** 6.27.1~ynh1
|
||||||
|
|
||||||
**Demo:** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
**Demo:** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 6.27~ynh1
|
**Version incluse :** 6.27.1~ynh1
|
||||||
|
|
||||||
**Démo :** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
**Démo :** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/wekan/wekan/releases/download/v6.27/wekan-6.27-amd64.zip
|
SOURCE_URL=https://github.com/wekan/wekan/releases/download/v6.26/wekan-6.26-amd64.zip
|
||||||
SOURCE_SUM=2447075b30d3283cec39b531359b8cba5a815b57b37e60b6d9c6a97026ef8687
|
SOURCE_SUM=3e83de1fe5a77db6f7ec6a3f9b2a7ea401dbbc4fd57931dbb9b4a02aef9974ec
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/wekan/wekan/releases/download/v6.27/wekan-6.27-arm64.zip
|
SOURCE_URL=https://github.com/wekan/wekan/releases/download/v6.26/wekan-6.26-arm64.zip
|
||||||
SOURCE_SUM=4df0e24ecc8587638077b7e5ae512364798407689775adc90d534ccde253a9f6
|
SOURCE_SUM=0f85b0e90e4dba6a0545ac1fa264c43a6e1b2d85bf227ffe0dc9a8d6ce84357f
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Trello-like kanban",
|
"en": "Trello-like kanban",
|
||||||
"fr": "Un kanban similaire à Trello"
|
"fr": "Un kanban similaire à Trello"
|
||||||
},
|
},
|
||||||
"version": "6.27~ynh1",
|
"version": "6.27.1~ynh1",
|
||||||
"url": "https://wekan.github.io",
|
"url": "https://wekan.github.io",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies=""
|
pkg_dependencies=""
|
||||||
|
|
||||||
NODEJS_VERSION="14.19.2"
|
nodejs_version="14.19.3"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -73,7 +73,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
ynh_script_progression --message="Installing dependencies..."
|
ynh_script_progression --message="Installing dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_install_mongo
|
ynh_install_mongo
|
||||||
|
|
||||||
|
|
|
@ -44,13 +44,6 @@ test ! -d $final_path \
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
#=================================================
|
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -79,10 +72,17 @@ ynh_script_progression --message="Reinstalling dependencies..."
|
||||||
|
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_install_mongo
|
ynh_install_mongo
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MONGODB DATABASE
|
# RESTORE THE MONGODB DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_package_version
|
|
||||||
source ynh_mongo_db
|
source ynh_mongo_db
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -46,17 +45,6 @@ ynh_clean_setup () {
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION NUMBER
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
|
||||||
sleep 60
|
|
||||||
fi
|
|
||||||
abort_if_up_to_date
|
|
||||||
# previous function is what defines 'version', more precisely the 'previous version'
|
|
||||||
previous_version="${version}"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -83,36 +71,7 @@ if ! ynh_permission_exists --permission="admin"; then
|
||||||
ynh_permission_create --permission="admin" --allowed=$admin
|
ynh_permission_create --permission="admin" --allowed=$admin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
ynh_secure_remove --file="/etc/apt/sources.list.d/mongodb-org-3.2.list"
|
||||||
# MANAGE UPGRADE FROM PREVIOUS VERSION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Managing upgrade from previous version..."
|
|
||||||
|
|
||||||
if ynh_version_gt "0.45-2" "${previous_version}" ; then
|
|
||||||
ynh_script_progression --message="Upgrading to 0.45-2..."
|
|
||||||
ynh_replace_string --match_string="Environment=ROOT_URL=http://127.0.0.1:$port$path_url" --replace_string="Environment=ROOT_URL=https://$domain$path_url/" --target_file="/etc/systemd/system/$app.service"
|
|
||||||
systemctl daemon-reload
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ynh_version_gt "0.45-3" "${previous_version}" ; then
|
|
||||||
ynh_script_progression --message="Upgrading to 0.45-3..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then
|
|
||||||
ynh_script_progression --message="Upgrading to 1.07~ynh2..."
|
|
||||||
|
|
||||||
# Replace mongodb packages
|
|
||||||
# Assume no other app needs it >.>
|
|
||||||
rm -f /etc/apt/sources.list.d/mongodb-org-3.2.list
|
|
||||||
ynh_remove_app_dependencies
|
|
||||||
ynh_install_app_dependencies "mongodb mongodb-server"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ynh_version_gt "2.56~ynh1" "${previous_version}" ; then
|
|
||||||
# Create a dedicated .env config
|
|
||||||
config_file="$final_path/.env"
|
|
||||||
touch $config_file
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
@ -138,6 +97,16 @@ chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:$app "$final_path"
|
chown -R $app:$app "$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..."
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
ynh_use_nodejs
|
||||||
|
ynh_install_mongo
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -146,16 +115,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading dependencies..."
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
|
||||||
ynh_use_nodejs
|
|
||||||
ynh_install_mongo
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
read_json () {
|
|
||||||
sudo python3 -c "import sys, json;print(json.load(open('$1'))['$2'])"
|
|
||||||
}
|
|
||||||
|
|
||||||
read_manifest () {
|
|
||||||
if [ -f '../manifest.json' ] ; then
|
|
||||||
read_json '../manifest.json' "$1"
|
|
||||||
else
|
|
||||||
read_json '../settings/manifest.json' "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
abort_if_up_to_date () {
|
|
||||||
version=$(read_json "/etc/yunohost/apps/$YNH_APP_INSTANCE_NAME/manifest.json" 'version' 2> /dev/null || echo '20160501-7')
|
|
||||||
last_version=$(read_manifest 'version')
|
|
||||||
if [ "${version}" = "${last_version}" ]; then
|
|
||||||
ynh_script_progression --message="Up-to-date, nothing to do"
|
|
||||||
ynh_die "" 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
ynh_version_gt ()
|
|
||||||
{
|
|
||||||
dpkg --compare-versions "$1" gt "$2"
|
|
||||||
}
|
|
Loading…
Reference in a new issue