feat: build, run and test application locally
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
SRC := $(shell find . -name "*.go" | grep -v -e .pb.go -e .pb.micro.go)
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
ifneq (,$(wildcard ./.env))
|
||||
include .env
|
||||
export
|
||||
endif
|
||||
|
||||
fmt: ## Format and fix import order
|
||||
goimports -w -local "e46" $(SRC)
|
||||
|
||||
help: ## Display this help screen
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
build:
|
||||
go build -ldflags "-s -w" -o build/app .
|
||||
|
||||
run:
|
||||
make build-backoffice-gateway
|
||||
./build/app
|
||||
Reference in New Issue
Block a user