Makefile update with doc generation and convenience installers
This commit is contained in:
parent
ae0b0895b2
commit
d4a2a00f69
1 changed files with 16 additions and 1 deletions
|
@ -13,7 +13,7 @@ MIGRATIONS_DIR = internal/database/migrations
|
|||
|
||||
# Build target
|
||||
build:
|
||||
$(GOBUILD) -o bin/server cmd/*.go
|
||||
$(GOBUILD) -o bin/server main.go
|
||||
|
||||
# Run target
|
||||
run: build
|
||||
|
@ -71,6 +71,21 @@ lint:
|
|||
# Default target
|
||||
default: build
|
||||
|
||||
# Generate swagger docs
|
||||
.PHONY: docs
|
||||
docs:
|
||||
swag init -outputTypes go
|
||||
|
||||
install-swag:
|
||||
@echo "Installing swag"
|
||||
@go get -u github.com/swaggo/swag/cmd/swag
|
||||
|
||||
# Convenience target to install golangci-lint
|
||||
install-lint:
|
||||
@echo "Installing golangci-lint"
|
||||
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.42.1
|
||||
|
||||
# Convenience target to install just (requires sudo privileges)
|
||||
install-just:
|
||||
@echo "Installing just"
|
||||
@curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
|
||||
|
|
Loading…
Add table
Reference in a new issue