Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
66 lines (51 loc) · 2.1 KB
/
Copy pathjustfile
File metadata and controls
66 lines (51 loc) · 2.1 KB
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
# Copyright AI-Catalog Contributors (https://github.com/Agent-Card/ai-catalog-cli)
# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0
default:
@just --list
set windows-shell := ["powershell", "-NoLogo", "-NoProfile", "-Command"]
# renovate: datasource=github-releases depName=renovatebot/renovate versioning=semver
RENOVATE_VERSION := "44.198.0"
BIN_DIR := justfile_directory() / ".bin"
# The version is part of the path, so a bump installs fresh instead of
# reusing whatever is already there.
RENOVATE_HOME := BIN_DIR / ("renovate-" + RENOVATE_VERSION)
RENOVATE_BIN := RENOVATE_HOME / "node_modules" / ".bin" / "renovate"
demo_oci_layout_command := if os_family() == "windows" {
"powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File ./demo/oci-layout-walkthrough.ps1"
} else {
"./demo/oci-layout-walkthrough.sh"
}
demo_consumer_command := if os_family() == "windows" {
"powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File ./demo/consumer-walkthrough.ps1"
} else {
"./demo/consumer-walkthrough.sh"
}
build:
cargo build
lint:
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
test:
cargo test
demo-oci-layout:
{{demo_oci_layout_command}}
demo-consumer:
{{demo_consumer_command}}
# POSIX only; there is no PowerShell port of this walkthrough yet.
demo-trust:
./demo/trust-walkthrough.sh
# Sync dependencies with Renovate (local and analytical unless RENOVATE_PLATFORM is set)
[unix]
renovate-sync *OPTS: _renovate
"{{ RENOVATE_BIN }}" --platform "${RENOVATE_PLATFORM:-local}" {{ OPTS }}
[unix]
_renovate:
[ -x "{{ RENOVATE_BIN }}" ] || npm install --prefix "{{ RENOVATE_HOME }}" --no-audit --no-fund --loglevel=error renovate@{{ RENOVATE_VERSION }}
coverage:
toolchain="$(awk -F'"' '/^channel = / {print $2}' rust-toolchain.toml)"; \
host="$(rustc -vV | sed -n 's/^host: //p')"; \
toolchain_root="$(dirname "$(dirname "$(rustup which rustc --toolchain "$toolchain")")")"; \
LLVM_COV="$toolchain_root/lib/rustlib/$host/bin/llvm-cov" \
LLVM_PROFDATA="$toolchain_root/lib/rustlib/$host/bin/llvm-profdata" \
cargo llvm-cov --summary-only