-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (32 loc) · 787 Bytes
/
Makefile
File metadata and controls
44 lines (32 loc) · 787 Bytes
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
42
43
44
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 -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
deps-update:
go get -u ./...
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}