|
3 | 3 | export RUST_BACKTRACE := env_var_or_default("RUST_BACKTRACE", "short")
|
4 | 4 | export RUSTFLAGS := env_var_or_default("RUSTFLAGS", "-D warnings -A deprecated")
|
5 | 5 |
|
6 |
| -toolchain := "" |
7 |
| -cargo := "cargo" + if toolchain != "" { " +" + toolchain } else { "" } |
8 |
| - |
9 |
| -# If we're running in Github Actions and cargo-action-fmt is installed, then add |
10 |
| -# a command suffix that formats errors. |
11 |
| -_fmt := if env_var_or_default("GITHUB_ACTIONS", "") != "true" { "" } else { |
12 |
| - ``` |
13 |
| - if command -v cargo-action-fmt >/dev/null 2>&1; then |
14 |
| - echo "--message-format=json | cargo-action-fmt" |
15 |
| - fi |
16 |
| - ``` |
17 |
| -} |
18 |
| - |
19 | 6 | default: fetch deny lint test-build test
|
20 | 7 |
|
21 | 8 | lint: check-fmt clippy docs md-lint action-lint action-dev-check
|
22 | 9 |
|
23 | 10 | md-lint:
|
24 |
| - markdownlint-cli2 '**/*.md' '!**/node_modules' '!**/target' |
| 11 | + markdownlint-cli2 '**/*.md' '!**/target' |
25 | 12 |
|
26 | 13 | fetch:
|
27 |
| - {{ cargo }} fetch |
| 14 | + just-cargo fetch |
28 | 15 |
|
29 | 16 | check-fmt:
|
30 |
| - {{ cargo }} fmt -- --check |
| 17 | + just-cargo fmt -- --check |
31 | 18 |
|
32 | 19 | clippy:
|
33 |
| - {{ cargo }} clippy --frozen --workspace --all-targets --all-features {{ _fmt }} |
| 20 | + just-cargo clippy --frozen --workspace --all-targets --all-features |
34 | 21 |
|
35 | 22 | deny:
|
36 |
| - {{ cargo }} deny --all-features check |
| 23 | + cargo-deny --all-features check |
37 | 24 |
|
38 | 25 | docs:
|
39 |
| - {{ cargo }} doc --frozen --no-deps --features=k8s-openapi/v1_24 {{ _fmt }} |
| 26 | + just-cargo doc --frozen --no-deps --features=k8s-openapi/v1_25 |
40 | 27 |
|
41 | 28 | test-build *flags:
|
42 |
| - {{ cargo }} test --no-run --frozen {{ flags }} {{ _fmt }} |
| 29 | + just-cargo test-build --frozen {{ flags }} |
43 | 30 |
|
44 | 31 | test *flags:
|
45 |
| - {{ cargo }} test --frozen {{ flags }} |
| 32 | + just-cargo test --frozen {{ flags }} |
46 | 33 |
|
47 | 34 | publish *flags:
|
48 |
| - {{ cargo }} publish --features=k8s-openapi/v1_24 {{ flags }} |
49 |
| - |
| 35 | + cargo publish --features=k8s-openapi/v1_25 {{ flags }} |
50 | 36 |
|
51 |
| -## |
52 |
| -## GitHub Actions |
53 |
| -## |
54 |
| - |
55 |
| -# Format actionlint output for Github Actions if running in CI. |
56 |
| -_actionlint-fmt := if env_var_or_default("GITHUB_ACTIONS", "") != "true" { "" } else { |
57 |
| - '{{range $err := .}}::error file={{$err.Filepath}},line={{$err.Line}},col={{$err.Column}}::{{$err.Message}}%0A```%0A{{replace $err.Snippet "\\n" "%0A"}}%0A```\n{{end}}' |
58 |
| -} |
59 |
| - |
60 |
| -# Lints all GitHub Actions workflows |
61 | 37 | action-lint:
|
62 |
| - actionlint {{ if _actionlint-fmt != '' { "-format '" + _actionlint-fmt + "'" } else { "" } }} .github/workflows/* |
| 38 | + just-dev lint-actions |
63 | 39 |
|
64 |
| -# Ensure all devcontainer versions are in sync |
65 | 40 | action-dev-check:
|
66 |
| - action-dev-check |
67 |
| - |
68 |
| -# vim: set ft=make : |
| 41 | + just-dev check-action-images |
| 42 | + just-dev pull-action-images |
0 commit comments