-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathTaskfile.yml
More file actions
41 lines (40 loc) · 1.13 KB
/
Taskfile.yml
File metadata and controls
41 lines (40 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: "3"
tasks:
install-requirements:
desc: install requirements
cmds:
- mkdir tmp
- task: _download-protoc
- task: _unzip-protoc
- mkdir -p bin
- rm -rf bin/protoc
- task: _locate-protoc
- rm -rf ./tmp
- go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- rm -rf ./text-files; git clone --quiet https://github.com/devlights/text-files
_download-protoc:
dir: tmp
cmds:
- curl -L https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip --output protoc.zip
_unzip-protoc:
dir: tmp
cmds:
- unzip ./protoc.zip -d protoc
_locate-protoc:
dir: tmp
cmds:
- mv -f ./protoc/ ../bin
protoc:
desc: gen protoc
cmds:
- mkdir -p internal
- bin/protoc/bin/protoc --go_out=. --go-grpc_out=require_unimplemented_servers=false:. proto/*.proto
run:
desc: run
cmds:
- go run cmd/server/server.go &
- sleep 1
- time go run cmd/client/client.go
- sleep 1
- pkill server