diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2026-01-04 13:48:30 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2026-01-04 13:48:30 +0200 |
| commit | 200251fafc27059bb18e0c9ff449af0302cd82b5 (patch) | |
| tree | 96628a95a12e6da889d083ea0cace7d69233cbd2 /Taskfile.yml | |
| parent | dad94e6ddd5caaa2f0717cfab16346d56f6822a9 (diff) | |
| download | pub-200251fafc27059bb18e0c9ff449af0302cd82b5.tar.zst | |
Add taskfile to generate protobuf
Diffstat (limited to 'Taskfile.yml')
| -rw-r--r-- | Taskfile.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..82921bc --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,37 @@ +version: "3" + +tasks: + generate: + desc: "Generate protobuf code" + cmds: + - protoc --go_out=internal/weather/pb --go_opt=paths=source_relative protos/weather.proto + + build: + desc: "Build all binaries" + cmds: + - task: generate + - go build -o bin/publisher ./cmd/publisher + - go build -o bin/subscriber ./cmd/subscriber + + run-publisher: + desc: "Run publisher with auto-generation" + cmds: + - task: generate + - go run ./cmd/publisher + + run-subscriber: + desc: "Run subscriber with auto-generation" + cmds: + - task: generate + - go run ./cmd/subscriber + + watch: + desc: "Watch and rebuild on changes" + cmds: + - task: generate + sources: + - "**/*.go" + - "**/*.proto" + generates: + - "internal/weather/pb/*.go" + method: timestamp |
