Skip to content
Maidfile.toml 1.23 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]
address = { host = "localhost", port = 3500, ssl = false }
theMackabu's avatar
theMackabu committed
token = "test_token1"
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']
VERSION='1.2.1'
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 --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
[tasks.build.cache]
theMackabu's avatar
theMackabu committed
path = "maid"
target = ["bin/maid", "bin/maid-server"]
theMackabu's avatar
theMackabu committed
# [tasks.build.remote]
# silent = false
# exclusive = false
# shell = "/bin/bash"
# image = "messense/cargo-zigbuild:latest"
# push = ["crates", "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
api_server = { depends = ["build"], script = "./maid_server", path = "bin" }
theMackabu's avatar
theMackabu committed
clean = { info = "Clean binary files", script = ["rm -rf bin", "mkdir bin"] }
theMackabu's avatar
theMackabu committed
install = { info = "Move binary file", script = ["maid build -q","sudo cp bin/maid /usr/local/bin", "maid -V"] }