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 target
|
||||||
build:
|
build:
|
||||||
$(GOBUILD) -o bin/server cmd/*.go
|
$(GOBUILD) -o bin/server main.go
|
||||||
|
|
||||||
# Run target
|
# Run target
|
||||||
run: build
|
run: build
|
||||||
|
@ -71,6 +71,21 @@ lint:
|
||||||
# Default target
|
# Default target
|
||||||
default: build
|
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:
|
install-just:
|
||||||
@echo "Installing just"
|
@echo "Installing just"
|
||||||
@curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
|
@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