forked from OpenBazaar/openbazaar-go
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
53 lines (35 loc) · 778 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
44
45
46
47
48
49
50
51
52
53
##
## Building
##
deploy:
./deploy.sh
build:
./build.sh
build_linux:
./build.sh linux/amd64
##
## Protobuf compilation
##
P_TIMESTAMP = Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp
P_ANY = Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any
PKGMAP = $(P_TIMESTAMP),$(P_ANY)
protos:
cd pb/protos && protoc --go_out=$(PKGMAP):.. *.proto
##
## docker
##
DOCKER_PROFILE ?= openbazaar
DOCKER_IMAGE_NAME ?= $(DOCKER_PROFILE)/openbazaard
build_docker:
docker build -t $(DOCKER_IMAGE_NAME) .
push_docker:
docker push $(DOCKER_IMAGE_NAME)
docker: build_linux build_docker push_docker
##
## Cleanup
##
clean_build:
rm -f ./dist/*
clean_docker:
docker rmi -f $(DOCKER_IMAGE_NAME); true
clean: clean_build clean_docker