@@ -80,12 +80,12 @@ commands:
8080 usage : Show container logs for services.
8181 cmd : docker compose logs "$@"
8282
83+ # Drop into a shell if no arguments are supplied, otherwise run the command.
84+ # Environment variables are passed from the host and filtered by prefix.
85+ # Use \" (slash followed by a double quote) to escape double quotes in
86+ # arguments that contain spaces.
8387 cli :
8488 usage : Start a shell or run a command inside the CLI service container.
85- # Drop into a shell if no arguments are supplied, otherwise run the command.
86- # Environment variables are passed from the host and filtered by prefix.
87- # Use \" (slash followed by a double quote) to escape double quotes in
88- # arguments that contain spaces.
8989 cmd : |
9090 if [ "${#}" -ne 0 ]; then
9191 docker compose exec $(env | cut -f1 -d= | grep "TERM\|COMPOSE_\|GITHUB_\|PACKAGE_\|DOCKER_\|DRUPAL_\|VORTEX_" | sed 's/^/-e /') cli bash -c "$*"
@@ -122,7 +122,7 @@ commands:
122122 # ;< !PROVISION_TYPE_PROFILE
123123 download-db :
124124 usage : Download database. Run with "--no-cache" option to force fresh database backup.
125- aliases : [' fetch-db' ]
125+ aliases : [fetch-db]
126126 cmd : |
127127 case " $* " in *" --no-cache "*) export VORTEX_DB_DOWNLOAD_NO_CACHE=1;; esac
128128 ./scripts/vortex/download-db.sh
@@ -158,7 +158,7 @@ commands:
158158 cmd : \[ -n "${VORTEX_DB_IMAGE}" \] && docker pull ${VORTEX_DB_IMAGE} || true
159159
160160 reset :
161- usage : " Remove containers, all build files. Use with `hard` to reset repository to the last commit."
161+ usage : Remove containers, all build files. Use with `hard` to reset repository to the last commit.
162162 cmd : |
163163 ahoy confirm "All containers and build files will be removed. Proceed?" || exit 0
164164 AHOY_CONFIRM_RESPONSE=y ahoy down
@@ -190,7 +190,10 @@ commands:
190190
191191 lint :
192192 usage : Lint back-end and front-end code.
193- cmd : ahoy lint-be && ahoy lint-fe && ahoy lint-tests
193+ cmd : |
194+ ahoy lint-be
195+ ahoy lint-fe
196+ ahoy lint-tests
194197
195198 lint-be :
196199 usage : Lint back-end code.
@@ -211,11 +214,14 @@ commands:
211214
212215 lint-tests :
213216 usage : Lint tests code.
214- cmd : ahoy cli vendor/bin/gherkinlint lint tests/behat/features
217+ cmd : |
218+ ahoy cli vendor/bin/gherkinlint lint tests/behat/features
215219
216220 lint-fix :
217221 usage : Fix lint issues of back-end and front-end code.
218- cmd : ahoy lint-be-fix && ahoy lint-fe-fix
222+ cmd : |
223+ ahoy lint-be-fix
224+ ahoy lint-fe-fix
219225
220226 lint-be-fix :
221227 usage : Fix lint issues of back-end code.
@@ -234,7 +240,11 @@ commands:
234240
235241 test :
236242 usage : Run all tests.
237- cmd : ahoy test-unit && ahoy test-kernel && ahoy test-functional && ahoy test-bdd
243+ cmd : |
244+ ahoy test-unit
245+ ahoy test-kernel
246+ ahoy test-functional
247+ ahoy test-bdd
238248
239249 test-unit :
240250 usage : Run PHPUnit unit tests.
@@ -250,7 +260,7 @@ commands:
250260
251261 test-bdd :
252262 usage : Run BDD tests.
253- aliases : [' test-behat' ]
263+ aliases : [test-behat]
254264 cmd : ahoy cli php -d memory_limit=-1 vendor/bin/behat --colors "$@"
255265
256266 debug :
@@ -274,8 +284,7 @@ commands:
274284 local :
275285 usage : Custom local commands. See `ahoy local help`.
276286 optional : true
277- imports :
278- - .ahoy.local.yml
287+ imports : [.ahoy.local.yml]
279288
280289 # ----------------------------------------------------------------------------
281290 # Utilities.
@@ -307,15 +316,14 @@ commands:
307316 hide : true
308317
309318# Override entrypoint to alter default behavior of Ahoy.
319+ # 1. Exit the script if any statement returns a non-true return value.
320+ # 2. Read variables from .env file (while respecting existing values) to load
321+ # and pass updated environment variables' values into already running
322+ # containers.
310323entrypoint :
311324 - bash
312325 - -c
313- # Exit the script if any statement returns a non-true return value.
314326 - -e
315- # Read variables from .env file, respecting existing values.
316- # - Used to load and pass updated environment variables' values into already
317- # running containers.
318- # - Use `ahoy up cli` in cases when changes require container restart.
319327 - |
320328 t=$(mktemp) && export -p > "$t" && set -a && . ./.env && if [ -f ./.env.local ];then . ./.env.local;fi && set +a && . "$t" && rm "$t" && unset t
321329 bash -e -c "$0" "$@"
0 commit comments