feat: build, run and test application locally

This commit is contained in:
2022-08-07 23:05:39 +03:00
parent 06100b4209
commit d2b4bdf324
3 changed files with 49 additions and 2 deletions
+21
View File
@@ -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