-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (25 loc) · 872 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DOCKER_IMAGE_OWNER ?= viartemev
DOCKER_IMAGE_NAME ?= nhl-recap
DOCKER_IMAGE_TAG ?= latest
DOCKER_REGISTRY ?= ghcr.io
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: docker_build_image
docker_build_image: ## docker build
docker build -t ${DOCKER_REGISTRY}/${DOCKER_IMAGE_OWNER}/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) .
.PHONY: docker_push_image
docker_push_image: ## docker push
docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE_OWNER}/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
.PHONY: go_mod_verify
go_mod_verify: ## go mod verify
go mod verify
.PHONY: go_build
go_build: ## go build
go build -o $(DOCKER_IMAGE_NAME) main.go
.PHONY: lint
lint: ## golint ./...
golint ./...
.PHONY: test
test: ## go test -race -vet=off ./...
go test -race -vet=off ./...