2023-01-17 08:27:17 +00:00
|
|
|
[tasks.tauri_build]
|
2023-01-27 09:17:51 +00:00
|
|
|
description = "Build the Tauri backend & Run Code Generation"
|
2023-01-18 03:22:13 +00:00
|
|
|
script = ["""
|
2023-01-17 08:27:17 +00:00
|
|
|
cd appflowy_tauri/src-tauri
|
|
|
|
cargo build
|
2023-01-18 03:22:13 +00:00
|
|
|
"""]
|
2023-01-17 08:27:17 +00:00
|
|
|
script_runner = "@shell"
|
|
|
|
|
|
|
|
[tasks.tauri_dev]
|
2023-01-18 03:22:13 +00:00
|
|
|
script = ["""
|
2023-01-17 08:27:17 +00:00
|
|
|
cd appflowy_tauri
|
|
|
|
npm run tauri dev
|
2023-01-18 03:22:13 +00:00
|
|
|
"""]
|
2023-01-17 08:27:17 +00:00
|
|
|
script_runner = "@shell"
|
|
|
|
|
|
|
|
[tasks.tauri_clean]
|
2023-01-27 09:17:51 +00:00
|
|
|
description = "Remove all the building artifacts"
|
2023-01-17 08:27:17 +00:00
|
|
|
run_task = { name = [
|
2023-01-18 03:22:13 +00:00
|
|
|
"rust_lib_clean",
|
|
|
|
"rm_macro_build_cache",
|
|
|
|
"rm_rust_generated_files",
|
|
|
|
"rm_tauri_generated_protobuf_files",
|
|
|
|
"rm_tauri_generated_event_files",
|
2023-01-17 08:27:17 +00:00
|
|
|
] }
|
|
|
|
|
|
|
|
[tasks.rm_tauri_generated_protobuf_files]
|
|
|
|
private = true
|
|
|
|
script = ["""
|
2023-01-24 06:01:30 +00:00
|
|
|
protobuf_file_paths = glob_array ${TAURI_BACKEND_SERVICE_PATH}/classes
|
2023-01-17 08:27:17 +00:00
|
|
|
if not array_is_empty ${protobuf_file_paths}
|
|
|
|
echo Remove generated protobuf files:
|
|
|
|
for path in ${protobuf_file_paths}
|
|
|
|
echo remove ${path}
|
|
|
|
rm -rf ${path}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
"""]
|
|
|
|
script_runner = "@duckscript"
|
|
|
|
|
|
|
|
[tasks.rm_tauri_generated_event_files]
|
|
|
|
private = true
|
|
|
|
script = ["""
|
2023-01-24 06:01:30 +00:00
|
|
|
event_file_paths = glob_array ${TAURI_BACKEND_SERVICE_PATH}/events
|
|
|
|
if not array_is_empty ${event_file_paths}
|
2023-01-17 08:27:17 +00:00
|
|
|
echo Remove generated protobuf files:
|
2023-01-24 06:01:30 +00:00
|
|
|
for path in ${event_file_paths}
|
2023-01-17 08:27:17 +00:00
|
|
|
echo remove ${path}
|
|
|
|
rm -rf ${path}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
"""]
|
|
|
|
script_runner = "@duckscript"
|