diff options
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 |
