-
Notifications
You must be signed in to change notification settings - Fork 2
/
justfile
108 lines (85 loc) · 2.66 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
export OCI_ROOT_URL := "http://127.0.0.1:13030"
export OCI_NAMESPACE := "woof"
export OCI_DEBUG := "1"
export OCI_DELETE_MANIFEST_BEFORE_BLOBS := "1"
conformance-push focus="" $OCI_TEST_PUSH="1":
just conformance '{{focus}}'
conformance-pull focus="" $OCI_TEST_PUSH="1":
just conformance '{{focus}}'
conformance-management focus="" $OCI_TEST_CONTENT_MANAGEMENT="1":
just conformance '{{focus}}'
conformance-discovery focus="" $OCI_TEST_CONTENT_DISCOVERY="1":
just conformance '{{focus}}'
conformance-all focus="" $OCI_TEST_PUSH="1" $OCI_TEST_PULL="1" $OCI_TEST_CONTENT_DISCOVERY="1" $OCI_TEST_CONTENT_MANAGEMENT="1":
just conformance '{{focus}}'
conformance focus="":
pushd distribution-spec/conformance \
&& go test -c \
&& ./conformance.test -test.failfast -ginkgo.v -ginkgo.fail-fast
devenv-up:
docker compose up -d
sleep 1
just postgresql-migrate
devenv-down:
docker compose down
docker volume ls -f name=portfolio -q \
| xargs docker volume rm
devenv-cycle:
just devenv-down
just devenv-up
postgresql-migrate $DATABASE_URL="postgresql://postgres:password@localhost:5432/postgres?sslmode=disable":
sqlx migrate --source crates/portfolio_backend_postgres/migrations run
build:
cargo build
doc targetdir:
reset
cargo doc
rsync -av ./target/doc/ {{targetdir}}
build-refactor:
# requires cargo-limit to be installed
reset
(cargo lbuild --color=always 2>&1) | less -R
doc-refactor targetdir:
# requires cargo-limit to be installed
reset
(cargo ldoc --color=always 2>&1) | less -R
rsync -av ./target/doc/ {{targetdir}}
run config $RUST_LOG="info,portfolio=debug,tower_http=debug,sqlx::query=off":
./target/debug/portfolio --config-file {{config}}
refactor-and-run config:
just build-refactor
just run {{config}}
build-and-run config:
just build
just run {{config}}
watchexec +args:
watchexec \
-c \
-e toml,rs \
-w justfile \
-w Cargo.toml \
-w crates/portfolio_objectstore/src \
-w crates/portfolio_objectstore/Cargo.toml \
-w crates/portfolio_backend_postgres/src \
-w crates/portfolio_backend_postgres/Cargo.toml \
-w crates/portfolio_http/src \
-w crates/portfolio_http/Cargo.toml \
-w crates/portfolio_core/src \
-w crates/portfolio_core/Cargo.toml \
-w crates/portfolio/src \
-w crates/portfolio/Cargo.toml \
--restart \
just {{args}}
we-build-refactor:
just watchexec build-refactor
we-doc-refactor targetdir:
just watchexec doc-refactor {{targetdir}}
we-doc targetdir:
just watchexec doc {{targetdir}}
we-build:
just watchexec build
we-run-dev config:
watchexec \
-w target/debug/portfolio \
--restart \
just run {{config}}