Skip to content

Commit

Permalink
Merge pull request #1731 from tarlepp/feat/harmonize-makefile-commands
Browse files Browse the repository at this point in the history
Feat - Change `Makefile` commands
  • Loading branch information
tarlepp committed Mar 26, 2022
2 parents 2c365e1 + 4342423 commit fc90264
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions Makefile
Expand Up @@ -48,7 +48,7 @@ endif
ERROR_DOCKER = @printf "\033[31mSeems like that all necessary Docker containers are not running atm.\nCheck logs for detailed information about the reason of this\033[39m\n"
NOTICE_HOST = @printf "\033[33mRunning command from host machine by using 'docker-compose exec' command\033[39m\n"
WARNING_HOST = @printf "\033[31mThis command cannot be run inside docker container!\033[39m\n"
WARNING_DOCKER = @printf "\033[31mThis command must be run inside specified docker container and it's not\nrunning atm. Use \`make start\` and/or \`make watch-start\` command to get\nnecessary container(s) running and after that run this command again.\033[39m\n"
WARNING_DOCKER = @printf "\033[31mThis command must be run inside specified docker container and it's not\nrunning atm. Use \`make start\` and/or \`make daemon\` command to get\nnecessary container(s) running and after that run this command again.\033[39m\n"
WARNING_DOCKER_RUNNING = @printf "\033[31mDocker is already running - you cannot execute this command multiple times\033[39m\n"
.DEFAULT_GOAL := help
Expand Down Expand Up @@ -489,7 +489,7 @@ else
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) docker-compose logs --follow php nginx mariadb
endif
start: ## Start application in development mode
daemon: ## Start application in development mode in background
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
$(WARNING_HOST)
else ifneq ($(RUNNING_SOME_CONTAINERS), 0)
Expand All @@ -499,7 +499,7 @@ else
@printf "\033[32mContainers are running background, check logs for detailed information!\033[39m\n"
endif
build: ## Build containers and start application in development mode
daemon-build: ## Build containers and start application in development mode in background
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
$(WARNING_HOST)
else ifneq ($(RUNNING_SOME_CONTAINERS), 0)
Expand All @@ -516,7 +516,7 @@ else
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) docker-compose down
endif
watch: ## Start application in development mode + watch output
start: ## Start application in development mode + watch output
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
$(WARNING_HOST)
else ifneq ($(RUNNING_SOME_CONTAINERS), 0)
Expand All @@ -525,7 +525,7 @@ else
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) docker-compose up
endif
watch-build: ## Build containers and start application in development mode + watch output
start-build: ## Build containers and start application in development mode + watch output
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
$(WARNING_HOST)
else ifneq ($(RUNNING_SOME_CONTAINERS), 0)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -63,17 +63,17 @@ git clone https://github.com/tarlepp/symfony-flex-backend.git

### 2. Start containers [](#table-of-contents)

For this just run following command, which will start all the containers
background:
For this just run following command, which will start all the containers:

```bash
make start
```

If you like to see containers logs directly use following command:
If you like to start containers in background, then you can use following
command:

```bash
make watch
make daemon
```

These commands will create four (4) containers to run this backend application.
Expand Down
24 changes: 12 additions & 12 deletions doc/COMMANDS.md
Expand Up @@ -51,13 +51,11 @@ with just running `make` command:

```bash
bash # Get bash inside PHP container
build # Build containers and start application in
# development mode
cache-clear # Clears the cache
cache-warmup # Warms up an empty cache
check-dependencies-latest # Checks if any vendor dependency can be updated
# (latest versions)
check-dependencies-minor # Checks if any vendor dependency can be updated
check-dependencies-minor # Checks if any vendor dependency can be updated
# (only minor versions)
check-licenses # Check vendor licenses
clear-tools # Clears all tools dependencies
Expand All @@ -67,6 +65,10 @@ composer-unused # Show unused packages by scanning and comparing
# package namespaces against your source
composer-validate # Validate `composer.json` file content
configuration # Prints out application current configuration
daemon-build # Build containers and start application in
# development mode in background
daemon # Start application in development mode in
# background
ecs-fix # Runs The Easiest Way to Use Any Coding Standard
# to fix issues
ecs # Runs The Easiest Way to Use Any Coding Standard
Expand All @@ -84,27 +86,25 @@ phploc # Runs `phploc` and create json output
phpmetrics # Generates PhpMetrics static analysis
phpstan # Runs PHPStan static analysis tool
psalm-github # Runs Psalm static analysis tool
psalm # Runs Psalm static analysis tool
psalm-shepherd # Runs Psalm static analysis tool + report results
# to shepherd
psalm # Runs Psalm static analysis tool
report-fastest # Creates clover and JUnit xml from fastest run
run-tests-fastest-php # Runs all test via fastest (pure PHP)
run-tests-fastest-phpdbg # Runs all test via fastest (phpdbg)
run-tests-fastest-php # Runs all test via fastest (pure PHP)
run-tests-fastest # Runs all test via fastest (Uses phpdbg if that is
# installed)
run-tests-php # Runs all tests via phpunit (pure PHP)
run-tests-phpdbg # Runs all tests via phpunit (phpdbg)
run-tests-php # Runs all tests via phpunit (pure PHP)
run-tests # Runs all tests via phpunit (Uses phpdbg if that
# is installed)
start # Start application in development mode
start-build # Build containers and start application in
# development mode + watch output
start # Start application in development mode + watch
# output
stop # Stop application containers
update-bin # Update composer bin dependencies
update # Update composer dependencies
watch-build # Build containers and start application in
# development mode + watch output
watch # Start application in development mode + watch
# output

```

### Symfony console [](#table-of-contents)
Expand Down

0 comments on commit fc90264

Please sign in to comment.