chore: remove events files when run clean + rebuild all (#1284)

Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
Nathan.fooo 2022-10-15 17:15:11 +08:00 committed by GitHub
parent 4d1e1a1c28
commit 63111927cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ run_task = { name = "remove_files_with_pattern" }
#Dart Clean
[tasks.rm_dart_generated_files]
env = { "dart_flowy_sdk_path" = "./app_flowy/packages/flowy_sdk/" }
run_task = { name = ["rm_dart_generated_protobuf_files"] }
run_task = { name = ["rm_dart_generated_protobuf_files", "rm_dart_generated_event_files"] }
[tasks.rm_dart_generated_protobuf_files]
private = true
@ -63,6 +63,24 @@ script = [
script_runner = "@duckscript"
[tasks.rm_dart_generated_event_files]
private = true
script = [
"""
dart_event_folder = glob_array ${dart_flowy_sdk_path}/lib/dispatch/dart_event
if not array_is_empty ${dart_event_folder}
echo Remove generated dart event files:
for path in ${dart_event_folder}
echo remove ${path}
rm -rf ${path}
end
end
""",
]
script_runner = "@duckscript"
[tasks.remove_files_with_pattern]
private = true
script = [