From 00cb98c44b15b91a7aa6610d5d2d1f95a984b5f2 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 15 Nov 2024 07:26:13 -0700 Subject: [PATCH] Use env var for WORKBENCH_SESSION_INIT_VERSION or default to `get-version` to fetch version --- Justfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index b1d90cd0..a742d7e5 100644 --- a/Justfile +++ b/Justfile @@ -49,9 +49,13 @@ delete-builder: alias build := bake # just bake workbench-images bake target="default": + #!/bin/bash just -f {{justfile()}} create-builder || true + if [ -z "$WORKBENCH_SESSION_INIT_VERSION" ]; then + WORKBENCH_SESSION_INIT_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) + fi GIT_SHA=$(git rev-parse --short HEAD) \ - WORKBENCH_SESSION_INIT_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ + WORKBENCH_SESSION_INIT_VERSION=${WORKBENCH_SESSION_INIT_VERSION} \ docker buildx bake --builder=posit-builder -f docker-bake.hcl {{target}} # just preview-bake workbench-images dev @@ -90,8 +94,12 @@ preview-plan branch="$(git branch --show-current)": # just test workbench test target="default" file="docker-bake.hcl": + #!/bin/bash + if [ -z "$WORKBENCH_SESSION_INIT_VERSION" ]; then + WORKBENCH_SESSION_INIT_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) + fi GIT_SHA=$(git rev-parse --short HEAD) \ - WORKBENCH_SESSION_INIT_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \ + WORKBENCH_SESSION_INIT_VERSION=${WORKBENCH_SESSION_INIT_VERSION} \ python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --target "{{target}}" --file "{{file}}" # just preview-test connect dev