From 4014aba3e37a2a492c89298d15e63e51cc171ff9 Mon Sep 17 00:00:00 2001 From: bloodearnest Date: Fri, 24 Nov 2023 14:08:41 +0000 Subject: [PATCH] justfile doc and tweaks --- justfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index e3844d7..5b4bb6a 100644 --- a/justfile +++ b/justfile @@ -6,19 +6,27 @@ export BUILD_DATE := `date +'%y-%m-%dT%H:%M:%S.%3NZ'` export BUILD_NUMBER := `date +'%y%m%d%H%M%S'` export REVISION := `git rev-parse --short HEAD` - +# build docker image for version build version target="python" *args="": docker-compose --env-file {{ version }}/env build --pull {{ args }} {{ target }} -test version *args="tests -v": + +# test docker image for version +test version *args="tests -v": (build version) docker-compose --env-file {{ version }}/env run --rm -v $PWD:/workspace python pytest {{ args }} -update version *args="": + +# run pip-compile to add new dependencies, or update existing ones with --upgrade +update version *args="": (build version) docker-compose --env-file {{ version }}/env run --rm -v $PWD:/workspace base pip-compile {{ args }} {{ version }}/requirements.in -o {{ version }}/requirements.txt + +# run linters check: @docker pull hadolint/hadolint:v2.12.0 @docker run --rm -i hadolint/hadolint:v2.12.0 < Dockerfile + +# publish version (dry run by default - pass "true" to perform publish) publish version publish="false": PUBLISH={{ publish }} ./scripts/publish.sh {{ version }}