-
Notifications
You must be signed in to change notification settings - Fork 1
/
Maidfile.toml
55 lines (48 loc) · 1.38 KB
/
Maidfile.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
48
49
50
51
52
53
54
55
# Import tasks and environment from other files
import = [
"build/scripts/build.toml",
"build/scripts/test.toml",
"build/scripts/publish.toml"
]
[project]
name = "maid"
version = "2.0.0"
# Build on a remote server
[project.server]
token = "test_token1"
address = { host = "localhost", port = 3500, tls = false }
# Global environment (applied to shell)
[env]
BOOL = false
STRING = 'test'
TYPE = '%{dir.home} %{env.STRING} %{arg.1}'
ARR = ['hello', 'world']
VERSION='2.0.0'
# Advanced task definition
[tasks.build]
info = "Build binaries"
depends = ["log:clean"]
script = [
"cargo zigbuild --release --no-default-features --features client --color always",
# "cargo zigbuild --release --all-features --color always",
"cp target/release/maid bin/maid",
# "cp target/release/maid-server bin/maid-server",
]
# Build cache
[tasks.build.cache]
path = "maid"
# target = ["bin/maid", "bin/maid-server"]
target = ["bin/maid"]
# Remote build target
[tasks.build.remote]
silent = false
exclusive = false
shell = "/bin/bash"
image = "messense/cargo-zigbuild:latest"
push = ["maid", "build", "Cargo.toml", "Cargo.lock"]
pull = "bin"
# Basic task definition
[tasks]
clean.script = ["du -h bin", "rm -rf bin", "mkdir bin", "du -h bin"]
install.script = ["maid build -q","sudo cp bin/maid /usr/local/bin", "maid -V"]
api_server = { path = "bin", depends = ["build"], script = "./maid_server" }