chore: bump protobuf version (#4123)

makes it compatible with protoc_plugin 21.x.x
This commit is contained in:
Richard Shiue
2023-12-10 21:26:53 +08:00
committed by GitHub
parent 775955df5c
commit eff06a1f74
5 changed files with 10 additions and 17 deletions

View File

@ -23,8 +23,7 @@ windows_alias = "install-protobuf-windows"
linux_alias = "install-protobuf"
[tasks.install-protobuf]
condition_script = [
"""
condition_script = ["""
if ! command -v protoc-gen-dart
then
exit 0
@ -32,8 +31,7 @@ condition_script = [
# installed
exit 1
""",
]
"""]
run_task = { name = ["install_flutter_protobuf_compiler"] }
[tasks.install-protobuf-windows]
@ -45,7 +43,7 @@ if is_empty ${ret}
end
ret = which protoc-gen-dart
if is_empty ${ret}
exec cmd.exe /c dart pub global activate protoc_plugin 20.0.1
exec cmd.exe /c dart pub global activate protoc_plugin 21.1.2
end
ret = which protoc-gen-dart
if is_empty ${ret}
@ -60,18 +58,13 @@ script_runner = "@duckscript"
[tasks.install_flutter_protobuf_compiler]
script = """
echo "Install protoc_plugin (Dart)"
dart pub global activate protoc_plugin 20.0.1
dart pub global activate protoc_plugin 21.1.2
"""
script_runner = "@shell"
[tasks.install_flutter_protobuf_compiler.linux]
script = """
echo "Install protoc_plugin (Dart)"
dart pub global activate protoc_plugin 20.0.1
dart pub global activate protoc_plugin 21.1.2
"""
script_runner = "@shell"