diff --git a/templates/astro/run.twig b/templates/astro/run.twig index ab435a1..579bb67 100755 --- a/templates/astro/run.twig +++ b/templates/astro/run.twig @@ -8,9 +8,6 @@ set -eu PATH="$PATH:./node_modules/.bin" -# Include any local tasks. -source run.local || true - {% if not isFlake %} # If we're running in CI we need to disable TTY allocation for docker compose # commands that enable it by default, such as exec and run. @@ -106,6 +103,9 @@ function _run { } {% endif %} +# Include any local tasks. +source run.local || true + TIMEFORMAT=$'\nTask completed in %3lR' time "${@:-help}" diff --git a/templates/drupal/run.twig b/templates/drupal/run.twig index c5c410f..50dfd1f 100755 --- a/templates/drupal/run.twig +++ b/templates/drupal/run.twig @@ -4,9 +4,6 @@ set -eu -# Include any local tasks. -source run.local || true - # Run automated tests as part of the Continuous Integration (CI) pipeline. function ci:test { lint:dockerfile @@ -133,6 +130,9 @@ function _run { "${service}" "${@}" } +# Include any local tasks. +source run.local || true + TIMEFORMAT=$'\nTask completed in %3lR' time "${@:-help}" diff --git a/templates/fractal/run.twig b/templates/fractal/run.twig index 7a4e692..527acb2 100755 --- a/templates/fractal/run.twig +++ b/templates/fractal/run.twig @@ -9,9 +9,6 @@ set -eu PATH="$PATH:./node_modules/.bin" -# Include any local tasks. -source run.local || true - {% if isDocker %} # If we're running in CI we need to disable TTY allocation for docker compose # commands that enable it by default, such as exec and run. @@ -123,6 +120,9 @@ function _run { } {% endif %} +# Include any local tasks. +source run.local || true + TIMEFORMAT=$'\nTask completed in %3lR' time "${@:-help}" diff --git a/templates/terraform/run.twig b/templates/terraform/run.twig index fbc5d0b..8faf5bc 100755 --- a/templates/terraform/run.twig +++ b/templates/terraform/run.twig @@ -4,9 +4,6 @@ set -eu -# Include any local tasks. -source run.local || true - # Disable Git hooks. function git-hooks:off { git config --unset core.hooksPath @@ -26,6 +23,9 @@ function help { printf "\nExtended help:\n Each task has comments for general usage\n" } +# Include any local tasks. +source run.local || true + TIMEFORMAT=$'\nTask completed in %3lR' time "${@:-help}"