This repository was archived by the owner on Nov 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
62 lines (46 loc) · 1.27 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
.PHONY: clean restore depend binary
.DEFAULT: test
# GOPATH=$(shell godep path):$(shell echo $$GOPATH)
GODEP=GOPATH=$(shell godep path):${GOPATH}
binary:
godep go build -o bin/stacker
test: binary run
setup:
@echo "\033[32mChecking Dependencies\033[m"
@type go >/dev/null 2>&1|| { \
echo "\033[1;33mGo is required to build this application\033[m"; \
echo "\033[1;33mIf you are using homebrew on OSX, run\033[m"; \
echo "$$ brew install go --cross-compile-all"; \
exit 1; \
}
ifndef GOPATH
@echo "\033[1;33mGOPATH is not set.\033[m"
exit 1;
endif
@type godep >/dev/null 2>&1|| { \
echo "go get github.com/tools/godep"; \
go get github.com/tools/godep; \
}
@type godep >/dev/null 2>&1|| { \
echo "godep not found. Is ${GOPATH}/bin in your $$PATH?"; \
exit 1; \
}
@type gox >/dev/null 2>&1 || { \
echo "go get github.com/mitchellh/gox"; \
go get github.com/mitchellh/gox; \
}
linux64:
$(GODEP) gox -osarch="linux/amd64" -output="image_builder/stacker"
dockerbuild:
cd image_builder; \
docker build -t frosquin/stacker:dev .
run:
./bin/stacker -config_file=test.toml -logtostderr ${DEBUG}
debug: DEBUG = -v=2
debug: binary run
image: linux64 dockerbuild
push: image
docker push frosquin/stacker:dev
clean:
rm bin/stacker
rm image_builder/stacker