# ------------- # | Variables | # ------------- [env] CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true EXIT_ON_CLIENT_DISCONNECT = true # This variable will vary depending on where you installed Worlds, ideally, you # should know the correct value for your own system. # # If you DON'T know the correct value, DO NOT file an issue on GitHub, ask # someone within the Whirlsplash Discord server; # https://discord.com/invite/8hn6padWF6. # # See line 59! WORLDS_PATH = "C:\\Program Files (x86)\\Worlds Inc\\WorldsPlayer - Win7\\WorldsPlayer.exe" # ------------ # | Wrappers | # ------------ [tasks.fmt] command = "cargo" args = ["fmt"] private = true [tasks.check] command = "cargo" args = ["check"] private = true [tasks.clippy] command = "cargo" args = ["clippy"] private = true [tasks.test] command = "cargo" args = ["test"] private = true [tasks.bench] command = "cargo" args = ["bench"] private = true # ------------- # | Executors | # ------------- [tasks.checkf] workspace = false dependencies = ["fmt", "check"] [tasks.checkfc] workspace = false dependencies = ["fmt", "check", "clippy"] [tasks.checkall] workspace = false dependencies = ["fmt", "check", "clippy", "test", "bench"] [tasks.help] workspace = false dependencies = ["checkf"] command = "cargo" args = ["run", "--", "help"] [tasks.run] workspace = false dependencies = ["checkf"] command = "cargo" args = ["run", "--", "run", "distributor,hub"] # This task also depends on your system configuration, same goes as read above. [tasks.start-client] workspace = false command = "gsudo" args = ["${WORLDS_PATH}"] [tasks.runc] workspace = false dependencies = ["start-client", "run"] [tasks.runw] workspace = false env = { "DISABLE_PROMPT" = true } dependencies = ["checkf"] command = "cargo" args = ["run", "--", "run", "distributor,hub"] watch = true [tasks.docker-build] workspace = false command = "nix-build" args = ["docker.nix"] [tasks.docker-load] workspace = false script_runner = "@shell" script = ''' docker load < result ''' [tasks.docker-run] deprecated = true workspace = false command = "docker" args = [ "run", "--name", "Whirlsplash", # API Distributor Hub "-p", "8000:80", "-p", "6650:6650", "-p", "5673:5673", "-v", "/var/lib/whirl:/.whirl", "whirlsplash/whirl" ] [tasks.docker-run-i] deprecated = true workspace = false command = "docker" args = [ "run", "-it", "--name", "Whirlsplash", # API Distributor Hub "-p", "8000:80", "-p", "6650:6650", "-p", "5673:5673", "-v", "/var/lib/whirl:/.whirl", "--env", "DISABLE_PROMPT=false", "whirlsplash/whirl" ] # Build 'n' load [tasks.bnl] workspace = false dependencies = ["docker-build", "docker-load"] [tasks.ask-github-token] workspace = false script = ''' #!@duckscript echo github token: github_token = read echo set ${github_token} as the current github token set_env GITHUB_TOKEN ${github_token} ''' [tasks.act] workspace = false dependencies = ["ask-github-token"] command = "act" args = ["-s", "GITHUB_TOKEN=${GITHUB_TOKEN}"] [tasks.lint-sql] workspace = false command = "sqlfluff" args = ["lint", "./migrations/"] [tasks.gen-docs] workspace = false toolchain = "nightly" command = "cargo" args = ["doc", "--open", "--document-private-items", "--no-deps"] [tasks.kill] workspace = false command = "sudo" args = ["killall", "-s", "SIGKILL", "whirl", "--exact", "--wait"]