-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
62 lines (48 loc) · 1.29 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
57
58
59
60
61
62
#
# Makefile
# @author Evgeny Ukhanov <[email protected]>
#
.PHONY: run, test, build, fmt, docker-build, docker-rmi, docker-bld, install-go
default: run
GOVERSION = 1.9.1
run:
@go run server.go
test:
@./runtest.sh
build:
@go build
fmt:
@gofmt -w -l .
docker-build-registry:
@go build server.go
@docker build -t echo-cms .
@docker tag echo-cms 192.168.1.107:5000/echo-cms
@docker push 192.168.1.107:5000/echo-cms
docker-rmi:
@docker rmi echo-cms
docker-build:
@go build
@docker rmi echo-cms
@docker build -t echo-cms .
docker-run:
@docker run -p 3000:3000 --rm -it echo-cms
install-go:
@echo Installing Golang v$(GOVERSION)...
@echo [================================================================]
@wget -O /tmp/go.tar.gz https://storage.googleapis.com/golang/go$(GOVERSION).linux-amd64.tar.gz
@sudo tar -C /usr/local -xzf /tmp/go.tar.gz
@sudo ln -s /usr/local/go/bin/go /usr/local/bin/go
@sudo ln -s /usr/local/go/bin/godoc /usr/local/bin/godoc
@sudo ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
@echo [================================================================]
@echo Done.
vendoring:
@echo Start vendoring...
govendor init
for package in $(VENDORPACKAGES) ; do \
gvt fetch $$package ; \
done
rerun-install:
@go get github.com/tockins/realize
rerun:
@realize run