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-05-01 18:27:19 -07:00
|
|
|
~/go/bin/swag init -g cmd/server.go
|
|
|
|
go build cmd/server.go
|
2024-05-04 11:47:30 -07:00
|
|
|
ls -lh server
|
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-05-02 17:38:30 -07:00
|
|
|
goose -dir "./internal/database/migrations" sqlite3 ./cmd/newsbot.db up
|
2022-06-08 21:17:08 -07:00
|
|
|
|
|
|
|
migrate-dev-down: ## revert sql migrations to dev db
|
2024-05-02 17:38:30 -07:00
|
|
|
goose -dir "./internal/database/migrations" sqlite3 ./cmd/newsbot.db 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
|