2020-06-06 18:49:04 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								VERSION := $(shell git describe --always --long --dirty --tags)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								build:
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-06 18:52:02 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									go mod download
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-06 18:49:04 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									go build -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=${VERSION}'" ./...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								install:
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-06 18:52:02 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									go mod download
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-06 18:49:04 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									go install -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=${VERSION}'" ./...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-10 23:23:09 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gen:
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-13 00:23:21 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo Generating accountant gRPC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									protoc --proto_path proto --go_out=plugins=grpc:pkg/ --go_opt=paths=source_relative  proto/accounts/accounts.proto
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo Generating rove server gRPC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									protoc --proto_path proto --go_out=plugins=grpc:pkg/ --go_opt=paths=source_relative  proto/rove/rove.proto
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									protoc --proto_path proto --grpc-gateway_out=paths=source_relative:pkg/ proto/rove/rove.proto
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-13 10:40:34 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									protoc --proto_path proto --swagger_out=logtostderr=true:pkg/ proto/rove/rove.proto
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-10 23:23:09 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-06 18:49:25 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								test:
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-11 20:25:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo Unit tests
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									go test -v ./...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo Integration tests
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-11 18:55:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									docker-compose up --build --exit-code-from=rove-tests --abort-on-container-exit rove-tests
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-13 12:35:37 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									docker-compose down
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-11 18:55:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									go tool cover -html=/tmp/coverage-data/c.out -o /tmp/coverage.html
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-11 20:25:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-11 18:55:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@echo Done, coverage data can be found in /tmp/coverage.html
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-07 23:20:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-11 18:55:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.PHONY: build install test gen
							 |