mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
Remove --user=$app from composer helpers
Since we removed the custom helper that used exec_as
This commit is contained in:
parent
e11b722225
commit
99ef5d47fe
2 changed files with 8 additions and 8 deletions
|
@ -177,14 +177,14 @@ ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../c
|
||||||
case $language in
|
case $language in
|
||||||
fr)
|
fr)
|
||||||
ynh_script_progression --message="Installing French extension..." --weight=2
|
ynh_script_progression --message="Installing French extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\"
|
||||||
activate_flarum_extension $db_name "qiaeru-lang-french"
|
activate_flarum_extension $db_name "qiaeru-lang-french"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
||||||
;;
|
;;
|
||||||
de)
|
de)
|
||||||
ynh_script_progression --message="Installing German extension..." --weight=2
|
ynh_script_progression --message="Installing German extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\"
|
||||||
activate_flarum_extension $db_name "cbmainz-de"
|
activate_flarum_extension $db_name "cbmainz-de"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
||||||
|
|
|
@ -73,7 +73,7 @@ fi
|
||||||
# Remove SSOwat if it exists
|
# Remove SSOwat if it exists
|
||||||
ssowat_extension=$(ynh_app_setting_get --app=$app --key=ssowat_extension)
|
ssowat_extension=$(ynh_app_setting_get --app=$app --key=ssowat_extension)
|
||||||
if [ ! -z "$ssowat_extension" ]; then
|
if [ ! -z "$ssowat_extension" ]; then
|
||||||
ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"remove tituspijean/flarum-ext-auth-ssowat\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"remove tituspijean/flarum-ext-auth-ssowat\"
|
||||||
ynh_app_setting_delete --app=$app --key=ssowat_extension
|
ynh_app_setting_delete --app=$app --key=ssowat_extension
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -181,13 +181,13 @@ then
|
||||||
chown -R $app:www-data $final_path
|
chown -R $app:www-data $final_path
|
||||||
|
|
||||||
# Install Composer and Flarum
|
# Install Composer and Flarum
|
||||||
ynh_exec_warn_less ynh_install_composer --user=$app --phpversion=$phpversion --workdir=$final_path
|
ynh_exec_warn_less ynh_install_composer --phpversion=$phpversion --workdir=$final_path
|
||||||
|
|
||||||
# Perform migrations and clear cache
|
# Perform migrations and clear cache
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_script_progression --message="Upgrading Flarum and its extensions..." --weight=1
|
ynh_script_progression --message="Upgrading Flarum and its extensions..." --weight=1
|
||||||
ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ldap:$ldap_version --no-update\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ldap:$ldap_version --no-update\"
|
||||||
ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies\"
|
||||||
exec_as $app php$phpversion flarum migrate
|
exec_as $app php$phpversion flarum migrate
|
||||||
exec_as $app php$phpversion flarum cache:clear
|
exec_as $app php$phpversion flarum cache:clear
|
||||||
popd
|
popd
|
||||||
|
@ -209,14 +209,14 @@ fi
|
||||||
case $language in
|
case $language in
|
||||||
fr)
|
fr)
|
||||||
ynh_script_progression --message="Installing French extension..." --weight=2
|
ynh_script_progression --message="Installing French extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\"
|
||||||
activate_flarum_extension $db_name "qiaeru-lang-french"
|
activate_flarum_extension $db_name "qiaeru-lang-french"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||||
;;
|
;;
|
||||||
de)
|
de)
|
||||||
ynh_script_progression --message="Installing German extension..." --weight=2
|
ynh_script_progression --message="Installing German extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\"
|
||||||
activate_flarum_extension $db_name "cbmainz-de"
|
activate_flarum_extension $db_name "cbmainz-de"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||||
|
|
Loading…
Reference in a new issue