Skip to content

Commit

Permalink
fix (symfony): #33 fix permissions implemention
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaximo33 committed May 11, 2024
1 parent 89957bf commit e645ca2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion console/common/tasks/command_line
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ _mod_.run() {
if [ "${FORCE_SHOW_OUTPUT}" = "true" ]; then
eval "${COMMAND_LINE}"
else
eval "${COMMAND_LINE}" > /dev/null 2>&1
eval "${COMMAND_LINE}" > /dev/null 2>&1
fi
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ services:
depends_on: ['database']
networks: ['symfony']


database:
image: 'mariadb:10.11.2'
restart: always
Expand Down
20 changes: 11 additions & 9 deletions console/implemention/symfony/props/menu
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/usr/bin/env bash
{
# shellcheck disable=SC2168
local PATH_MENU="symfony.tasks"
local IMPLEMENT="Symfony"
# shellcheck disable=SC2168
local PATH_MENU="${IMPLEMENT,,}.tasks"

_mod_TITLE="Symfony https://symfony.com/ \nSelect an option:"
_mod_TITLE="$IMPLEMENT https://symfony.com/ \nSelect an option:"

_mod_MAIN=(
"symfony:project:config, $PATH_MENU.menu.show_config_project, Project config, Settings established in the project"
"symfony:console, $PATH_MENU.menu.console, Console, Symfony Console"
"symfony:docker, docker.tasks.menu.main, Docker, Dockerization management in the project"
"symfony:permissions:fix, $PATH_MENU.symfony_fix_permissions, Fix permissions, Apply permissions"
"symfony:database, mysql.tasks.menu.main, Database, Database Manager"
"${IMPLEMENT,,}:project:config, $PATH_MENU.menu.show_config_project, Project config, Settings established in the project"
"${IMPLEMENT,,}:console, $PATH_MENU.menu.console, Console, $IMPLEMENT Console"
"${IMPLEMENT,,}:docker, docker.tasks.menu.main, Docker, Dockerization management in the project"
"${IMPLEMENT,,}:permissions:fix, $PATH_MENU.menu.fix_permissions, Fix permissions, Apply permissions"
"${IMPLEMENT,,}:database, mysql.tasks.menu.main, Database, Database Manager"
)

_mod_CREATE_ENVIRONMENT=(
"symfony:create, $PATH_MENU.install.create_new_environment, Create new app, "
"symfony:clone, $PATH_MENU.install.clone_environment, Clone existing app, Clone from http://url.repository"
"${IMPLEMENT,,}:create, $PATH_MENU.install.create_new_environment, Create new app, "
"${IMPLEMENT,,}:clone, $PATH_MENU.install.clone_environment, Clone existing app, Clone from http://url.repository"
)

_mod_CREATE_ENVIRONMENT_VERSION=(
Expand Down
2 changes: 1 addition & 1 deletion console/implemention/symfony/tasks/install
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ _mod_.clone_environment(){
}

_mod_.docker_start(){
symfony.tasks.main.permissions_fix
docker.tasks.main.apache_stop
docker.tasks.main.dp_all_stop
docker.tasks.main.dp_build
efde.tasks.implemention.clear_global_variables
symfony.tasks.main.permissions_fix
common.tasks.message.success "SUCCES: Project installed successfully, check the url \n- http://localhost \n- http://localhost:8080\n"
}

3 changes: 2 additions & 1 deletion console/implemention/symfony/tasks/main
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ _mod_.run_command_app_cli(){
_mod_.permissions_fix(){
local PATH_APP="./app"
! common.tasks.directory.exists "$PATH_APP" && common.tasks.directory.create_recursive "$PATH_APP"
common.tasks.command_line.run true false "sudo chown -R $USER:$USER $PATH_APP"
sleep 2 # Important: Probably when the permissions are applied, the construction of the directories is not finished
common.tasks.command_line.run true false "sudo chown -R $UID $PATH_APP"
}

_mod_.symfony_console_run_command(){
Expand Down
2 changes: 1 addition & 1 deletion console/implemention/symfony/tasks/menu
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -euo pipefail
fi
}

_mod_.symfony_fix_permissions(){
_mod_.fix_permissions(){
symfony.tasks.main.permissions_fix
_mod_.main
}
Expand Down

0 comments on commit e645ca2

Please sign in to comment.