Fix issues
This commit is contained in:
15
Makefile
15
Makefile
@@ -4,6 +4,7 @@ SHELL := /bin/bash
|
||||
REGISTRY := registry.halfakop.ru
|
||||
REPOSITORY := $(NAMESPACE)/$(PACKAGE)
|
||||
PLATFORM ?= --platform=linux/amd64
|
||||
GOCACHE ?= $(CURDIR)/.cache/go-build
|
||||
|
||||
SOURCE_VERSION ?= $(shell cat VERSION)
|
||||
SOURCE_COMMIT ?= $(shell git rev-parse --short=8 HEAD)
|
||||
@@ -31,27 +32,27 @@ help:
|
||||
|
||||
download:
|
||||
@echo "Download dependencies"
|
||||
@go mod download
|
||||
@GOCACHE=$(GOCACHE) go mod download
|
||||
|
||||
fix:
|
||||
@echo "Fix code"
|
||||
@go fix ./...
|
||||
@GOCACHE=$(GOCACHE) go fix ./...
|
||||
|
||||
app: download fix
|
||||
@echo "Build application"
|
||||
@go build -ldflags "$(LDFLAGS)" -o ./${EXEC} ./src
|
||||
@GOCACHE=$(GOCACHE) go build -ldflags "$(LDFLAGS)" -o ./${EXEC} ./src
|
||||
|
||||
tests: app
|
||||
@echo "Run tests"
|
||||
@go test ./...
|
||||
@GOCACHE=$(GOCACHE) go test ./...
|
||||
|
||||
test:
|
||||
@echo "Run unit tests"
|
||||
@go test -count=1 ./...
|
||||
@GOCACHE=$(GOCACHE) go test -count=1 ./...
|
||||
|
||||
test-integration:
|
||||
@echo "Run integration tests (requires Docker for Postgres)"
|
||||
@go test -tags=integration -count=1 ./...
|
||||
@GOCACHE=$(GOCACHE) go test -tags=integration -count=1 ./...
|
||||
|
||||
run:
|
||||
@echo "Run application"
|
||||
@@ -59,7 +60,7 @@ run:
|
||||
|
||||
clean:
|
||||
@echo "Clean build environment"
|
||||
@rm -rf ./${EXEC}%
|
||||
@rm -rf ./${EXEC}% $(GOCACHE)
|
||||
|
||||
release: clean build login push
|
||||
|
||||
|
||||
Reference in New Issue
Block a user