| 1 |
.PHONY: codegen |
| 2 |
codegen: idl-submodule |
| 3 |
go get -u github.com/golang/protobuf/protoc-gen-go |
| 4 |
cp haystack-idl/proto/agent/spanAgent.proto haystack-idl/proto/. |
| 5 |
protoc -I haystack-idl/proto/ --go_out=plugins=grpc:. haystack-idl/proto/span.proto |
| 6 |
protoc -I haystack-idl/proto/ --go_out=plugins=grpc:. haystack-idl/proto/spanAgent.proto |
| 7 |
rm haystack-idl/proto/spanAgent.proto |
| 8 |
|
| 9 |
idl-submodule: |
| 10 |
git submodule init |
| 11 |
git submodule update |
| 12 |
|
| 13 |
.PHONY: test |
| 14 |
test: codegen |
| 15 |
go test -run TestUnit* |
| 16 |
|
| 17 |
.PHONY: integration_test |
| 18 |
integration_test: |
| 19 |
docker-compose -f docker-compose.yaml -p sandbox up -d |
| 20 |
sleep 30 |
| 21 |
go test -run TestIntegration* |
| 22 |
docker-compose -f docker-compose.yaml -p sandbox stop |
| 23 |
|
| 24 |
.PHONY: glide |
| 25 |
glide: |
| 26 |
glide --version || go get github.com/Masterminds/glide |
| 27 |
glide update |
| 28 |
|
| 29 |
.PHONY: validate |
| 30 |
validate: |
| 31 |
./scripts/validate-go |