-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (40 loc) · 1.93 KB
/
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
44
45
46
47
48
49
50
51
52
53
include .env
export
# enable module support across all go commands.
export GO111MODULE = on
version = 1.0.0
compile:
@echo "Compile icq app..."
GOOS=linux GOARCH=386 go build -o bin/icq-bot-${version}-linux-386 cmd/icq/main.go
GOOS=linux GOARCH=amd64 go build -o bin/icq-bot-${version}-linux-amd64 cmd/icq/main.go
GOOS=darwin GOARCH=386 go build -o bin/icq-bot-${version}-darwin-386 cmd/icq/main.go
GOOS=darwin GOARCH=amd64 go build -o bin/icq-bot-${version}-darwin-amd64 cmd/icq/main.go
GOOS=windows GOARCH=386 go build -o bin/icq-bot-${version}-windows-386.exe cmd/icq/main.go
GOOS=windows GOARCH=amd64 go build -o bin/icq-bot-${version}-windows-amd64.exe cmd/icq/main.go
@echo "Compile telegram app..."
GOOS=linux GOARCH=386 go build -o bin/telegram-bot-${version}-linux-386 cmd/telegram/main.go
GOOS=linux GOARCH=amd64 go build -o bin/telegram-bot-${version}-linux-amd64 cmd/telegram/main.go
GOOS=darwin GOARCH=386 go build -o bin/telegram-bot-${version}-darwin-386 cmd/telegram/main.go
GOOS=darwin GOARCH=amd64 go build -o bin/telegram-bot-${version}-darwin-amd64 cmd/telegram/main.go
GOOS=windows GOARCH=386 go build -o bin/telegram-bot-${version}-windows-386.exe cmd/telegram/main.go
GOOS=windows GOARCH=amd64 go build -o bin/telegram-bot-${version}-windows-amd64.exe cmd/telegram/main.go
clean:
rm -rf bin
rm -rf dist
lint:
golangci-lint run --fast
run_icq_bot:
go run cmd/icq/main.go
run_telegram_bot:
go run cmd/telegram/main.go
docker_build:
docker build -f build/Dockerfile.telegram -t zetraison/chgk-telegram-bot .
docker build -f build/Dockerfile.icq -t zetraison/chgk-icq-bot .
docker_run_telegram_bot:
docker run -it --rm -e TELEGRAM_BOT_TOKEN=$(TELEGRAM_BOT_TOKEN) --name chgk_telegram_bot zetraison/chgk-telegram-bot
docker_run_icq_bot:
docker run -it --rm -e ICQ_BOT_TOKEN=$(ICQ_BOT_TOKEN) --name chgk_icq_bot zetraison/chgk-icq-bot
release_dry_run:
goreleaser --snapshot --skip-publish --rm-dist
release:
goreleaser