-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
54 lines (45 loc) · 1.62 KB
/
mise.toml
File metadata and controls
54 lines (45 loc) · 1.62 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
[tools]
cargo-binstall = "1.17.8"
"cargo:cargo-zigbuild" = "0.22.1"
"cargo:kopium" = "0.22.5"
kustomize = "5.8.1"
rust = "1.94.0"
yq = "4.52.4"
zig = "0.15.2"
[env]
'_'.file.path = ".env"
[tasks.kope]
run = "kopium --auto --smart-derive-elision --derive PartialEq --derive Default --schema derived"
[tasks.crdgen]
depends = "build"
run = "./target/$(rustc --print host-tuple | sed s/gnu/musl/)/debug/crdgen > yaml/cfdtunnels.cloudflared-operator.vrtx.sh.yaml"
[tasks.bundlegen]
run = "kustomize build yaml/kustomize > yaml/bundle.yaml"
[tasks.build]
sources = ["Cargo.toml", "Cargo.lock", "src/**/*.rs"]
run = [
"rustup target add $(rustc --print host-tuple | sed s/gnu/musl/)",
"cargo zigbuild --target $(rustc --print host-tuple | sed s/gnu/musl/)",
]
[tasks.dev]
depends = "build"
run = "./target/$(rustc --print host-tuple | sed s/gnu/musl/)/debug/operator"
[tasks.dev.env]
OPERATOR_NAMESPACE = "cfd-dev-system"
WATCH_NAMESPACE = "cfd-dev-system"
[tasks.'docker:build']
sources = ["Dockerfile", "docker/*", "Cargo.toml", "Cargo.lock", "src/**/*.rs"]
usage = """
flag "--repository <repository>" help="oci repository" default="ghcr.io/tehlordvortex/cloudflared-operator"
flag "--push" default="false"
flag "--tag <tag>" default="dev"
flag "--target <target>" default="operator"
flag "--progress <progress>" default="auto"
"""
run = """
docker buildx build --platform=linux/amd64,linux/arm64 --push={{ usage.push }} \
--target {{ usage.target }} --progress {{ usage.progress }} \
-t {{ usage.repository }}/operator:{{ usage.tag }} .
"""
[tasks.'docker:build:versioned']
run = "mise docker:build --tag v$(yq '.package.version' Cargo.toml)"