feat: install protoc-gen-dart if not installed

This commit is contained in:
appflowy
2022-02-08 22:42:00 +08:00
parent dd3f1d0b24
commit f55de1fd17
3 changed files with 58 additions and 26 deletions

View File

@ -1,5 +1,5 @@
[tasks.flowy_dev]
run_task = { name = ["install_prerequests","install_diesel", "install_protobuf"] }
run_task = { name = ["install_prerequests","install_diesel"] }
[tasks.install_windows_deps.windows]
dependencies=["check_duckscript_installation", "check_visual_studio_installation", "check_vcpkg", "install_vcpkg_sqlite", "install_rust_vcpkg_cli"]
@ -95,30 +95,6 @@ dependencies=["install_targets"]
[tasks.install_prerequests.windows]
dependencies=["install_targets", "install_windows_deps"]
[tasks.install_protobuf]
script = """
dart pub global activate protoc_plugin
cargo install --version 2.22.1 protobuf-codegen
"""
[tasks.install_protobuf.windows]
script = """
ret = which dart
if is_empty ${ret}
echo Please make sure flutter/dart is properly installed and in PATH env var
exit -1
end
ret = which protoc-gen-dart
if is_empty ${ret}
exec cmd.exe /c dart pub global activate protoc_plugin
home_dir = get_home_dir
echo Please add '${home_dir}\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\bin' into PATH env var
exit -1
end
exec cargo install --version 2.22.1 protobuf-codegen
"""
script_runner = "@duckscript"
[tasks.install_tools]
script = """
rustup component add rustfmt