mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
2.5.4
This commit is contained in:
parent
84f9a2edc7
commit
f71aa9cd68
5 changed files with 17 additions and 46 deletions
|
@ -41,8 +41,8 @@ ram.runtime = "50M"
|
|||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.3.tar.gz"
|
||||
sha256 = "28289aec6f2b8c2cd134af2b88b8076cf0f50da58855eda2dac6813a374df33d"
|
||||
url = "https://github.com/hackmdio/codimd/archive/refs/tags/2.5.4.tar.gz"
|
||||
sha256 = "1bd556e617188bd82fe40460a16eaeead495a87b2dd1417b12d2b8b6319ff131"
|
||||
autoupdate.strategy = "latest_github_tag"
|
||||
|
||||
[resources.ports]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
nodejs_version=16
|
||||
nodejs_version=20
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -22,15 +22,11 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP SYSTEMD
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -10,9 +10,7 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
#=================================================
|
||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
|
||||
|
|
|
@ -9,12 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -27,26 +21,14 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
|||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=16
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=16
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir=$install_dir --keep="config.json .sequelizerc"
|
||||
fi
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir=$install_dir --keep="config.json .sequelizerc"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -60,30 +42,25 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
|||
#==============================================
|
||||
# INSTALL CODIMD
|
||||
#==============================================
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=16
|
||||
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=16
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build
|
||||
popd
|
||||
fi
|
||||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH bin/setup
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Collaborative Markdown notes" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue