-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (49 loc) · 1.06 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
54
55
56
GOC=go build
GOFLAGS=-a -ldflags '-s'
CGOR=CGO_ENABLED=0
IMAGE_NAME=unixvoid/binder
DOCKER_OPTIONS="--no-cache"
run:
go run \
binder/binder.go \
binder/register.go \
binder/rotate.go \
binder/bootstrap.go \
binder/upload.go \
binder/set_key.go \
binder/set_file.go \
binder/get_key.go \
binder/get_file.go \
binder/encrypt.go \
binder/decrypt.go \
binder/remove.go
stat:
mkdir -p bin/
$(CGOR) $(GOC) $(GOFLAGS) -o bin/binder binder/*.go
dependencies:
go get github.com/gorilla/mux
go get github.com/unixvoid/glogger
go get gopkg.in/gcfg.v1
go get gopkg.in/redis.v4
go get golang.org/x/crypto/sha3
docker:
$(MAKE) stat
mkdir stage.tmp/
cp bin/binder stage.tmp/
cp config.gcfg stage.tmp/
cp deps/Dockerfile stage.tmp/
cd stage.tmp/ && \
sudo docker build $(DOCKER_OPTIONS) -t $(IMAGE_NAME) .
@echo "$(IMAGE_NAME) built"
compose:
cd deps/binder-stack/ && \
sudo docker-compose up
compose-build:
cd deps/binder-stack/ && \
sudo docker-compose build
link-volume:
cd deps/ && \
./linkvolume.sh
clean:
rm -rf bin/
rm -rf stage.tmp/