Skip to content
Maidfile.toml 1.28 KiB
Newer Older
theMackabu's avatar
theMackabu committed
# import tasks and enviroment from other files
import = ["scripts/build.toml", "scripts/test.toml"]

[project]
name = "maid"
theMackabu's avatar
theMackabu committed
version = "0.8.1"
theMackabu's avatar
theMackabu committed
# build on a remote server
[project.server]
theMackabu's avatar
theMackabu committed
address = { host = "100.79.107.11", port = 3500, ssl = false }
theMackabu's avatar
theMackabu committed
token = "test_token"

# global enviroment
[env]
BOOL = false
STRING = 'test'
TYPE = '%{dir.home} %{env.STRING} %{arg.1}'
ARR = ['hello', 'world']
theMackabu's avatar
theMackabu committed
VERSION='0.8.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
   # "maid clean -q",
theMackabu's avatar
theMackabu committed
   "cargo build --release", 
theMackabu's avatar
theMackabu committed
   "mv target/release/maid bin/maid",
theMackabu's avatar
theMackabu committed
   "mv target/release/maid_server bin/maid_server",
   "mv target/release/exit_test bin/exit_test"
]

theMackabu's avatar
theMackabu committed
[tasks.build.cache]
theMackabu's avatar
theMackabu committed
path = "crates"
theMackabu's avatar
theMackabu committed
target = [
   "bin/maid", 
   "bin/exit_test", 
   "bin/maid_server"
]

theMackabu's avatar
theMackabu committed
[tasks.build.remote]
image = "rust"
theMackabu's avatar
theMackabu committed
push = ["crates", "Cargo.toml", "Cargo.lock"]
pull = [
   "bin/maid", 
   "bin/exit_test", 
   "bin/maid_server"
]
theMackabu's avatar
theMackabu committed

theMackabu's avatar
theMackabu committed
# basic task definition 
[tasks]
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 = ["sudo cp bin/maid /usr/local/bin", "echo Copied binary!"], depends = ["build"] }
theMackabu's avatar
theMackabu committed
buildall = { info = "build all", script = ["rm -rf build", "mkdir build", "maid _build_macos", "maid _build_linux", "maid _build_windows"] }