1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/chitchatter_ynh.git synced 2024-09-03 18:15:59 +02:00
This commit is contained in:
Éric Gaspar 2024-08-31 20:21:35 +02:00
parent 4245594d4e
commit 899aab5b84
7 changed files with 3 additions and 21 deletions

View file

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

View file

@ -3,9 +3,6 @@
#=================================================
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================
# PHP APP SPECIFIC
#=================================================
# nodejs version
nodejs_version=20
version_commit=fcf9fcea52d1e09d689ed6998d729aa8d08be604
version_commit=66ffd169485caf7fdf2792b025d53964ba474968

View file

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

View file

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

View file

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

View file

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

View file

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