# import tasks and enviroment from other files import = [ "scripts/build.toml", "scripts/test.toml", "scripts/publish.toml" ] [project] name = "maid" version = "1.1.0" # build on a remote server [project.server] address = { host = "100.79.107.11", port = 3500, ssl = false } token = "test_token" # global enviroment [env] BOOL = false STRING = 'test' TYPE = '%{dir.home} %{env.STRING} %{arg.1}' ARR = ['hello', 'world'] VERSION='1.1.0' [tasks.build] info = "Build binaries" depends = ["clean"] script = [ "cargo zigbuild --release --color always", "mv target/release/maid bin/maid", "mv target/release/maid_server bin/maid_server", "mv target/release/exit_test bin/exit_test" ] [tasks.build.cache] path = "crates" target = [ "bin/maid", "bin/exit_test", "bin/maid_server" ] [tasks.build.remote] silent = false exclusive = false shell = "/bin/bash" image = "messense/cargo-zigbuild:latest" push = ["crates", "Cargo.toml", "Cargo.lock"] pull = "bin" # basic task definition [tasks] api_server = { depends = ["build"], script = "./maid_server", path = "bin" } clean = { info = "Clean binary files", script = ["rm -rf bin", "mkdir bin"] } install = { info = "Move binary file", script = ["sudo cp bin/maid /usr/local/bin", "echo Copied binary!"], depends = ["build"] }