diff --git a/manifest.toml b/manifest.toml index 734ffe8..e25ccb3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ demo = "https://chitchatter.im/" code = "https://github.com/jeremyckahn/chitchatter" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/_common.sh b/scripts/_common.sh index 18a1bc3..6c2ecb0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,9 +3,6 @@ #================================================= # COMMON VARIABLES AND CUSTOM HELPERS #================================================= -# PHP APP SPECIFIC -#================================================= -# nodejs version nodejs_version=20 -version_commit=fcf9fcea52d1e09d689ed6998d729aa8d08be604 +version_commit=66ffd169485caf7fdf2792b025d53964ba474968 diff --git a/scripts/backup b/scripts/backup index af443d9..5d6d43d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index 4166c8e..caf7127 100755 --- a/scripts/install +++ b/scripts/install @@ -16,10 +16,9 @@ ynh_nodejs_install ynh_script_progression "Setting up source files..." mkdir -p "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" + git config --system --add safe.directory $install_dir -# Download, check integrity, uncompress and patch the source from GitHub git clone https://github.com/jeremyckahn/chitchatter "$install_dir" --quiet pushd "$install_dir" @@ -31,7 +30,6 @@ popd #================================================= ynh_script_progression "Configuring NGINX web server..." -# Create a dedicated NGINX config ynh_config_add_nginx #================================================= @@ -40,14 +38,11 @@ ynh_config_add_nginx ynh_script_progression "Configuring the app..." pushd $install_dir - ynh_hide_warnings npm install -g npm@latest serve ynh_hide_warnings npm install ynh_hide_warnings npm run build popd -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index a987c3b..ec6c54a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,7 +8,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing NGINX web server configuration..." -# Remove the dedicated NGINX config ynh_config_remove_nginx ynh_nodejs_remove diff --git a/scripts/restore b/scripts/restore index 253c3b6..b9ed73b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # SPECIFIC RESTORATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f3d24cf..5e0e145 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,9 +9,7 @@ source /usr/share/yunohost/helpers ynh_script_progression "Upgrading source files..." pushd $install_dir - #REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" git config --system --add safe.directory $install_dir - ynh_exec_as_app git fetch ynh_exec_as_app git reset --hard --quiet $version_commit ynh_exec_as_app git pull @@ -38,14 +36,11 @@ ynh_config_add_nginx ynh_script_progression "Configuring the app..." pushd $install_dir - ynh_hide_warnings npm install -g npm@latest serve ynh_hide_warnings npm install ynh_hide_warnings npm run build popd -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # END OF SCRIPT #=================================================