Skip to content

Commit c33a221

Browse files
committed
fix(just): avoid recipe recursion
1 parent ab87cb1 commit c33a221

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

justfile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,17 @@ host := `ip route get 1 | sed -En 's/^.*src ([0-9.]*) .*$/\1/p'`
1616
default:
1717
just --unsorted --list --no-aliases
1818

19-
# Get package version.
20-
[private]
21-
get-version:
22-
#!/usr/bin/env bash
23-
grep -E '^__version__ += +' src/modos/__init__.py \
24-
| sed -E 's/.*= +//' \
25-
| tr -d '"'
26-
2719
alias dev := develop
20+
2821
# Enter a development shell.
2922
develop:
3023
just nix::develop default
3124

3225
# Set up python environment.
3326
setup:
3427
@echo "🔧 Setting up python environment"
35-
#UV_CONCURRENT_BUILDS=1 uv sync --all-extras --group dev
36-
#uv run pre-commit install
28+
uv sync --all-extras --group dev
29+
uv run pre-commit install
3730

3831

3932
# Run all quality checks.

tools/just/image.just

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,28 @@ set shell := ["bash", "-cue"]
44
root_dir := `git rev-parse --show-toplevel`
55
registry := "ghcr.io/sdsc-ordes"
66
repository := "modos-api"
7-
tag := `just get-version`
87
ctr := "docker"
98

9+
tag_cmd := (
10+
"grep -E '^__version__ += +' " +
11+
root_dir +
12+
"/src/modos/__init__.py | sed -E 's/.*= +//' | tr -d '\"'"
13+
)
14+
1015
[private]
1116
default:
1217
just --unsorted --no-aliases --list image
1318

1419
# Build the modos-api client image.
20+
[no-cd]
1521
build:
1622
@echo "🐋 Building docker image"
17-
cd {{root_dir}} && \
18-
{{ctr}} build \
19-
-f ./tools/image/Dockerfile \
20-
--build-arg="VERSION_BUILD={{tag}}" \
21-
-t {{registry}}/{{repository}}:{{tag}} .
23+
{{ctr}} build \
24+
-f ./tools/image/Dockerfile \
25+
--build-arg=VERSION_BUILD=`{{tag_cmd}}` \
26+
-t {{registry}}/{{repository}}:`{{tag_cmd}}` .
2227

2328
# Push the modos-api client image.
29+
[no-cd]
2430
push: build
25-
cd {{root_dir}} && \
26-
{{ctr}} push {{registry}}/{{repository}}:{{tag}}
31+
{{ctr}} push {{registry}}/{{repository}}:`{{tag_cmd}}`

0 commit comments

Comments
 (0)