Skip to content
Maidfile.toml 1.35 KiB
Newer Older
theMackabu's avatar
theMackabu committed
# Import tasks and environment from other files
theMackabu's avatar
theMackabu committed
import = [
theMackabu's avatar
theMackabu committed
   "build/scripts/build.toml", 
   "build/scripts/test.toml",
   "build/scripts/publish.toml"
theMackabu's avatar
theMackabu committed
]
[project]
name = "maid"
theMackabu's avatar
theMackabu committed
version = "2.0.0"
theMackabu's avatar
theMackabu committed
# Build on a remote server
theMackabu's avatar
theMackabu committed
[project.server]
theMackabu's avatar
theMackabu committed
token = "test_token1"
address = { host = "localhost", port = 3500, ssl = false }
theMackabu's avatar
theMackabu committed
# Global environment (applied to shell)
theMackabu's avatar
theMackabu committed
[env]
BOOL = false
STRING = 'test'
TYPE = '%{dir.home} %{env.STRING} %{arg.1}'
ARR = ['hello', 'world']
theMackabu's avatar
theMackabu committed
VERSION='2.0.0'
theMackabu's avatar
theMackabu committed
# Advanced task definition 
theMackabu's avatar
theMackabu committed
[tasks.build]
info = "Build binaries"
theMackabu's avatar
theMackabu committed
depends = ["clean"]
theMackabu's avatar
theMackabu committed
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",
theMackabu's avatar
theMackabu committed
# Build cache
theMackabu's avatar
theMackabu committed
[tasks.build.cache]
theMackabu's avatar
theMackabu committed
path = "maid"
# target = ["bin/maid", "bin/maid-server"]
target = ["bin/maid"]
theMackabu's avatar
theMackabu committed
# 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"
theMackabu's avatar
theMackabu committed

theMackabu's avatar
theMackabu committed
# Basic task definition 
theMackabu's avatar
theMackabu committed
[tasks]
theMackabu's avatar
theMackabu committed
clean.script = ["rm -rf bin", "mkdir bin"]
install.script =["maid build -q","sudo cp bin/maid /usr/local/bin", "maid -V"]
api_server = { path = "bin", depends = ["build"], script = "./maid_server" }