-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
43 lines (37 loc) · 944 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
# go build
GO_BUILD=go build -ldflags -s -v
BINARY_NAME=das_account_indexer_server
# update
update:
go mod tidy
# linux
indexer_linux:
export GOOS=linux
export GOARCH=amd64
$(GO_BUILD) -o $(BINARY_NAME) cmd/main.go
mkdir -p bin/linux
mv $(BINARY_NAME) bin/linux/
@echo "build $(BINARY_NAME) successfully."
# mac
indexer_mac:
export GOOS=darwin
export GOARCH=amd64
$(GO_BUILD) -o $(BINARY_NAME) cmd/main.go
mkdir -p bin/mac
mv $(BINARY_NAME) bin/mac/
@echo "build $(BINARY_NAME) successfully."
# win
indexer_win: BINARY_NAME=das_account_indexer_server.exe
indexer_win:
export GOOS=windows
export GOARCH=amd64
$(GO_BUILD) -o $(BINARY_NAME) cmd/main.go
mkdir -p bin/win
mv $(BINARY_NAME) bin/win/
@echo "build $(BINARY_NAME) successfully."
docker:
docker build --network host -t admindid/das-account-indexer:latest .
docker-publish:
docker image push admindid/das-account-indexer:latest
# default
default: indexer_linux