Skip to content

Commit

Permalink
feat(makefile): add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-piovesan committed Dec 13, 2021
1 parent 23f14cf commit bde73ae
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.SILENT: ; # no need for @
.DEFAULT: help # Running Make will run the help target

help: ## Show Help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

deps: ## Install dependencies
go mod tidy
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
go install github.com/kyleconroy/sqlc/cmd/sqlc@latest
go install github.com/segmentio/golines@latest

migrate: ## Run database migrations
migrate -path db/migrations -database ${DSN} up

sqlc: ## Generate sqlc files
sqlc generate

integration:
go test -v -tags=integration ./...

0 comments on commit bde73ae

Please sign in to comment.