generated from VLADIMIR/template
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			827 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			827 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
generate:
 | 
						|
	rm -rf proto
 | 
						|
	mkdir -p proto
 | 
						|
 | 
						|
	protoc -I ./api \
 | 
						|
      --go_out ./proto --go_opt paths=source_relative \
 | 
						|
      --go-grpc_out ./proto --go-grpc_opt paths=source_relative \
 | 
						|
      --grpc-gateway_out ./proto --grpc-gateway_opt paths=source_relative \
 | 
						|
      --swagger_out=allow_merge=true,merge_file_name=main:./proto \
 | 
						|
      ./api/main.proto
 | 
						|
 | 
						|
run:
 | 
						|
	go run ./cmd/evening_detective/main.go
 | 
						|
 | 
						|
build:
 | 
						|
	rm -rf bin
 | 
						|
	CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o bin/evening_detective_macos_arm64 cmd/evening_detective/main.go
 | 
						|
	CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o bin/evening_detective_macos_amd64 cmd/evening_detective/main.go
 | 
						|
 | 
						|
text_to_story:
 | 
						|
	rm -f ./cmd/text_to_story/story.json
 | 
						|
	go run ./cmd/text_to_story/main.go
 | 
						|
 | 
						|
clear:
 | 
						|
	rm ./internal/tests/store.db
 | 
						|
 | 
						|
test:
 | 
						|
	DB_FILENAME=store.db go test -count=1 ./...
 |