-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (35 loc) · 1.5 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
#!/bin/bash
export LANG=zh_CN.UTF-8
ENVARG=CGO_ENABLED=0 GOPROXY=https://goproxy.cn,direct
LINUXARG=GOOS=linux GOARCH=amd64
BUILDARG=-mod=mod -ldflags " -s -X main.buildTime=`date '+%Y-%m-%dT%H:%M:%S'` -X main.gitHash=`git symbolic-ref --short -q HEAD`:`git rev-parse --short HEAD`"
dep:
cd src; ${ENVARG} go get ./...;
updep:
cd src; ${ENVARG} go get -u ./...; go mod tidy;
remover:
cd src/remover; ${ENVARG} go build ${BUILDARG} -o ../../bin/redis-remover *.go;
copyer:
cd src/copyer; ${ENVARG} go build ${BUILDARG} -o ../../bin/redis-copyer *.go;
expirer:
cd src/expirer; ${ENVARG} go build ${BUILDARG} -o ../../bin/redis-expirer *.go;
idler:
cd src/idler; ${ENVARG} go build ${BUILDARG} -o ../../bin/redis-idler *.go;
paser:
cd src/paser; ${ENVARG} go build ${BUILDARG} -o ../../bin/redis-paser *.go;
all: remover copyer expirer idler paser
linux_remover:
cd src/remover; ${ENVARG} ${LINUXARG} go build ${BUILDARG} -o ../../lbin/redis-remover *.go;
linux_copyer:
cd src/copyer; ${ENVARG} ${LINUXARG} go build ${BUILDARG} -o ../../lbin/redis-copyer *.go;
linux_expirer:
cd src/expirer; ${ENVARG} ${LINUXARG} go build ${BUILDARG} -o ../../lbin/redis-expirer *.go;
linux_idler:
cd src/idler; ${ENVARG} ${LINUXARG} go build ${BUILDARG} -o ../../lbin/redis-idler *.go;
linux_paser:
cd src/paser; ${ENVARG} ${LINUXARG} go build ${BUILDARG} -o ../../lbin/redis-paser *.go;
linux_all: linux_remover linux_copyer linux_expirer linux_idler linux_paser
clean:
rm -fr bin/*
rm -fr lbin/*
rm src/go.sum