Add a task to get proto from a branch

Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
2026-05-05 23:11:15 +02:00
parent 34bfc16c2a
commit 81e2bf2ef4
3 changed files with 16 additions and 6 deletions

View File

@@ -10,3 +10,16 @@ tasks:
desc: Run web-server
cmd: flutter run -d web-server --web-port 8080
silent: true
get-proto-from-branch:
desc: Get the latest version of generated protobuf code from the branch
silent: true
vars:
WORKDIR:
sh: mktemp -d
cmds:
- git clone git@gitea.badhouseplants.net:softplayer/softplayer-dart-proto.git '{{ .WORKDIR }}'
- git -C '{{ .WORKDIR }}' checkout '{{ .CLI_ARGS }}'
- yq -i ".dependencies.softplayer_dart_proto.git.ref = \"$(git -C '{{ .WORKDIR }}' rev-parse HEAD)\"" pubspec.yaml
- rm -rf '{{ .WORKDIR }}'
- flutter pub get