build: add justfile
This commit is contained in:
parent
3784535b07
commit
a4ac338cfb
11
justfile
Normal file
11
justfile
Normal file
|
@ -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 }}
|
29
run
29
run
|
@ -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 <task> [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}"
|
|
Loading…
Reference in a new issue