-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
47 lines (38 loc) · 1.15 KB
/
Makefile.toml
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
[env]
VERSION = { script = [ "grep '^version = ' Cargo.toml | sed 's/version = \"\\(.*\\)\"/\\1/g'" ] }
[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--emit=files"]
[tasks.clippy]
install_crate = "clippy"
command = "cargo"
args = ["clippy", "--", "-D", "warnings"]
[tasks.build]
command = "cargo"
args = ["build"]
dependencies = ["format", "clippy"]
[tasks.test]
command = "cargo"
args = ["llvm-cov", "--html"]
[tasks.generate-completion]
script = [
"cargo run -- --generate-completion",
"cp -r target/completions ./assets"
]
[tasks.start]
description = "Start the document server"
script = ["hugo -s site server"]
[tasks.site]
description = "Build the site document"
script = ["hugo -s site"]
[tasks.docker]
description = "Build the docker image for the current arch"
script = [
"docker build -t ghcr.io/tamada/totebag:latest -t ghcr.io/tamada/totebag:${VERSION} ."
]
[tasks.docker_buildx]
description = "Build the docker image for multi-arch"
script = [
"docker buildx build --platform linux/arm64/v8,linux/amd64 --output=type=image,push=true -t ghcr.io/tamada/totebag:latest -t ghcr.io/tamada/totebag:${VERSION} ."
]