diff --git a/manifest.toml b/manifest.toml index 85d30cf..caf2a45 100644 --- a/manifest.toml +++ b/manifest.toml @@ -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] diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..44277c5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=16 +nodejs_version=20 #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index d487780..78b4491 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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" #================================================= diff --git a/scripts/remove b/scripts/remove index 64802ec..2e560e2 100644 --- a/scripts/remove +++ b/scripts/remove @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index cd36635..9b0fc7d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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" #=================================================