1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00

Switch to the '-complete' release archive witch already the vendor/ and js deps shipped inside ?

This commit is contained in:
Alexandre Aubin 2024-07-18 17:03:10 +02:00
parent 198dce221f
commit a9efa52132
3 changed files with 10 additions and 42 deletions

View file

@ -55,10 +55,10 @@ ram.runtime = "50M"
[resources]
[resources.sources.main]
url = "https://github.com/roundcube/roundcubemail/releases/download/1.6.7/roundcubemail-1.6.7.tar.gz"
sha256 = "b12c4f9f84890830ce10e470ac0d698b7de00d29f432a9326b4cf8c590e558de"
url = "https://github.com/roundcube/roundcubemail/releases/download/1.6.7/roundcubemail-1.6.7-complete.tar.gz"
sha256 = "cf52515e65b2818cb02fd7a202c766367b8c54d8b7fea27dda9c81aa7ce1d3a6"
autoupdate.strategy = "latest_github_release"
autoupdate.asset = "roundcubemail-.*.tar.gz"
autoupdate.asset = "roundcubemail-.*-complete.tar.gz"
[resources.system_user]

View file

@ -24,20 +24,11 @@ ynh_config_add_nginx
# Create a dedicated php-fpm config
ynh_config_add_phpfpm
#=================================================
# SPECIFIC SETUP
#=================================================
# INSTALL AND INITIALIZE COMPOSER
#=================================================
ynh_script_progression "Installing Roundcube with Composer..."
# Install composer.json
cp "$install_dir/composer.json-dist" "$install_dir/composer.json"
# Install composer
ynh_composer_install
ynh_composer_exec install --no-dev
#=================================================
# SPECIFIC SETUP
#=================================================
# INITIALIZE DATABASE
#=================================================
@ -58,9 +49,6 @@ ynh_config_add --template="config.inc.php" --destination="$install_dir/config/co
#=================================================
ynh_script_progression "Installing additional plugins..."
# Create logs and temp directories
mkdir -p "$install_dir/"{logs,temp}
# Install net_LDAP
export COMPOSER_ALLOW_SUPERUSER=1
ynh_composer_exec require kolab/net_ldap3
@ -122,8 +110,9 @@ ynh_script_progression "Updating Roundcube configuration..."
ynh_replace --match="^\s*// installed plugins" --replace="&\n $installed_plugins" --file="$install_dir/config/config.inc.php"
# Update javascript dependencies
(cd "$install_dir"
/usr/bin/php$php_version -q ./bin/install-jsdeps.sh -v ?)
# (REMOVEME? -> already done in the -complete.tar.gz archive)
#(cd "$install_dir"
#/usr/bin/php$php_version -q ./bin/install-jsdeps.sh -v ?)
# Store the config file checksum into the app settings
ynh_store_file_checksum "$install_dir/config/config.inc.php"

View file

@ -46,6 +46,8 @@ ynh_config_add_phpfpm
# Create a dedicated NGINX config
ynh_config_add_nginx
ynh_composer_install
#=================================================
# CONFIGURE ROUNDCUBE
#=================================================
@ -55,34 +57,11 @@ ynh_script_progression "Reconfiguring Roundcube..."
deskey=$(ynh_string_random --length=24)
ynh_config_add --template="config.inc.php" --destination="$install_dir/config/config.inc.php"
#=================================================
# UPDATE DEPENDENCIES WITH COMPOSER
#=================================================
ynh_script_progression "Updating dependencies with Composer..."
# Upgrade composer itself
ynh_composer_install
ynh_composer_exec install --no-dev
# Check if dependencies need to be updated with Composer
if [ -f "$install_dir/composer.json" ]
then
ynh_composer_exec update
# Update plugin-installer for Composer version 2.0
ynh_composer_exec require roundcube/plugin-installer:>=0.2.0
else
# Install composer.json
cp "$install_dir/composer.json-dist" "$install_dir/composer.json"
fi
#=================================================
# UPGRADE ADDITIONAL PLUGINS
#=================================================
ynh_script_progression "Upgrading additional plugins..."
# Create logs and temp directories
mkdir -p "$install_dir/"{logs,temp}
# Install net_LDAP
ynh_composer_exec require kolab/net_ldap3