2022-04-02 12:09:43 -07:00
|
|
|
.PHONY: help
|
|
|
|
help: ## Shows this help command
|
|
|
|
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
|
|
|
|
|
|
build: ## builds the application with the current go runtime
|
2022-06-19 22:02:44 -07:00
|
|
|
~/go/bin/swag f
|
2024-04-29 16:49:52 -07:00
|
|
|
~/go/bin/swag init -g cmd/server.go
|
|
|
|
go build cmd/server.go
|
2022-04-02 12:09:43 -07:00
|
|
|
|
|
|
|
docker-build: ## Generates the docker image
|
|
|
|
docker build -t "newsbot.collector.api" .
|
|
|
|
docker image ls | grep newsbot.collector.api
|
2022-06-08 21:17:08 -07:00
|
|
|
|
|
|
|
migrate-dev: ## Apply sql migrations to dev db
|
2024-04-23 07:15:38 -07:00
|
|
|
goose -dir "./internal/database/migrations" postgres "user=postgres password=postgres dbname=postgres sslmode=disable" up
|
2022-06-08 21:17:08 -07:00
|
|
|
|
|
|
|
migrate-dev-down: ## revert sql migrations to dev db
|
2024-04-23 07:15:38 -07:00
|
|
|
goose -dir "./internal/database/migrations" postgres "user=postgres password=postgres dbname=postgres sslmode=disable" down
|
2022-06-19 22:02:44 -07:00
|
|
|
|
|
|
|
swag: ## Generates the swagger documentation with the swag tool
|
2024-04-28 11:42:30 -07:00
|
|
|
~/go/bin/swag f
|
|
|
|
~/go/bin/swag init -g cmd/server.go
|
2022-06-19 22:02:44 -07:00
|
|
|
|
|
|
|
gensql: ## Generates SQL code with sqlc
|
|
|
|
sqlc generate
|