-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
41 lines (30 loc) · 768 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
33
34
35
36
37
38
39
40
41
BINARY_NAME=app
CURRENT_DIR=$(shell pwd)
TAG=$(shell git name-rev --tags --name-only $(shell git rev-parse HEAD))
DOCKER_REGISTRY=mxssl
export GO111MODULE=on
.PHONY: all build clean lint critic test
all: build
build:
go build -v -mod=vendor -o ${BINARY_NAME}
clean:
rm -f ${BINARY_NAME}
lint:
golangci-lint run -v
test:
go test -v ./...
init:
go mod init
tidy:
go mod tidy
github-release-dry:
@echo "TAG: ${TAG}"
goreleaser release --rm-dist --snapshot --skip-publish
github-release:
@echo "TAG: ${TAG}"
goreleaser release --rm-dist
docker-release:
@echo "Registry: ${DOCKER_REGISTRY}"
@echo "TAG: ${TAG}"
docker build --tag ${DOCKER_REGISTRY}/selectel-billing-exporter:${TAG} .
docker push ${DOCKER_REGISTRY}/selectel-billing-exporter:${TAG}