Skip to content
Maidfile.toml 1.25 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"
theMackabu's avatar
theMackabu committed
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 = [
theMackabu's avatar
theMackabu committed
   "cargo zigbuild --release --all-features --color always", 
theMackabu's avatar
theMackabu committed
   "mv target/release/maid bin/maid",
theMackabu's avatar
theMackabu committed
   "mv 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"]
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"
}