-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (34 loc) · 820 Bytes
/
Makefile
File metadata and controls
47 lines (34 loc) · 820 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
45
46
BINARY_NAME=bot
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
update-deps:
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 buildx build --platform linux/amd64,linux/arm64 \
--tag ${DOCKER_REGISTRY}/tg-captcha-bot:${TAG} \
--tag ${DOCKER_REGISTRY}/tg-captcha-bot:latest \
--push .