File tree Expand file tree Collapse file tree 2 files changed +16
-18
lines changed Expand file tree Collapse file tree 2 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -16,24 +16,17 @@ host := `ip route get 1 | sed -En 's/^.*src ([0-9.]*) .*$/\1/p'`
16
16
default :
17
17
just --unsorted --list --no-aliases
18
18
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
-
27
19
alias dev := develop
20
+
28
21
# Enter a development shell.
29
22
develop :
30
23
just nix::develop default
31
24
32
25
# Set up python environment.
33
26
setup :
34
27
@ 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
37
30
38
31
39
32
# Run all quality checks.
Original file line number Diff line number Diff line change @@ -4,23 +4,28 @@ set shell := ["bash", "-cue"]
4
4
root_dir := ` git rev-parse --show-toplevel `
5
5
registry := " ghcr.io/sdsc-ordes"
6
6
repository := " modos-api"
7
- tag := ` just get-version `
8
7
ctr := " docker"
9
8
9
+ tag_cmd := (
10
+ " grep -E '^__version__ += +' " +
11
+ root_dir +
12
+ " /src/modos/__init__.py | sed -E 's/.*= +//' | tr -d '\" '"
13
+ )
14
+
10
15
[private ]
11
16
default :
12
17
just --unsorted --no-aliases --list image
13
18
14
19
# Build the modos-api client image.
20
+ [no-cd ]
15
21
build :
16
22
@ 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}} ` .
22
27
23
28
# Push the modos-api client image.
29
+ [no-cd ]
24
30
push : build
25
- cd {{ root_dir}} && \
26
- {{ ctr}} push {{ registry}} / {{ repository}} :{{ tag}}
31
+ {{ ctr}} push {{ registry}} / {{ repository}} :` {{tag_cmd}} `
You can’t perform that action at this time.
0 commit comments