forked from mxssl/tg-captcha-bot
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
43 lines (32 loc) · 882 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
42
43
BINARY_NAME=bot
CURRENT_DIR=$(shell pwd)
TAG=$(shell git name-rev --tags --name-only $(shell git rev-parse HEAD))
DOCKER_REGISTRY=momai
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
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}/tg-captcha-bot:${TAG} .
docker tag ${DOCKER_REGISTRY}/tg-captcha-bot:${TAG} ${DOCKER_REGISTRY}/tg-captcha-bot:latest
docker push ${DOCKER_REGISTRY}/tg-captcha-bot:${TAG}
docker push ${DOCKER_REGISTRY}/tg-captcha-bot:latest