From a4ac338cfb89d9492bbfacb526aa763021364fdf Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 21 Feb 2023 08:18:55 +0000 Subject: [PATCH] build: add justfile --- justfile | 11 +++++++++++ run | 29 ----------------------------- 2 files changed, 11 insertions(+), 29 deletions(-) create mode 100644 justfile delete mode 100755 run diff --git a/justfile b/justfile new file mode 100644 index 0000000..f49acb5 --- /dev/null +++ b/justfile @@ -0,0 +1,11 @@ +default: + @just --list + +composer *args: + just _exec php composer {{ args }} + +drush *args: + just _exec php drush {{ args }} + +_exec +args: + docker compose exec {{ args }} diff --git a/run b/run deleted file mode 100755 index 5650997..0000000 --- a/run +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -e - -function cmd { - _dc php "${@}" -} - -function composer { - cmd composer "${@}" -} - -function drush { - cmd php vendor/bin/drush "${@}" -} - -function help { - printf "%s [args]\n\nTasks:\n" "${0}" - - compgen -A function | grep -v "^_" | cat -n - - printf "\nExtended help:\n Each task has comments for general usage\n" -} - -function _dc { - docker compose run --rm "${@}" -} - -eval "${@:-help}"