This repository has been archived by the owner on Jul 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
54 lines (44 loc) · 2.37 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
build:
$(eval VERSION := $(shell godep go run fugu/main.go fugu/usage.go fugu/version.go --version))
(cd fugu && GOOS=linux GOARCH=amd64 godep go build -o ../build/fugu.v$(VERSION).linux.x86_64)
(cd build && tar -cvzf fugu.v$(VERSION).linux.x86_64.tar.gz fugu.v$(VERSION).linux.x86_64)
rm build/fugu.v$(VERSION).linux.x86_64
(cd fugu && GOOS=darwin GOARCH=amd64 godep go build -o ../build/fugu.v$(VERSION).darwin.x86_64)
(cd build && tar -cvzf fugu.v$(VERSION).darwin.x86_64.tar.gz fugu.v$(VERSION).darwin.x86_64)
rm build/fugu.v$(VERSION).darwin.x86_64
# TODO returns error: docker/docker/pkg/term/term.go:16: undefined: Termios
# GOOS=windows GOARCH=amd64 godep go build -o build/fugu.v$(VERSION).windows.x86_64
# cd build && tar -cvzf fugu.v$(VERSION).windows.x86_64.tar.gz fugu.v$(VERSION).windows.x86_64)
# rm build/fugu.v$(VERSION).windows.x86_64
install:
(cd fugu && godep go install)
clean:
rm -r build/*
rm fugu/fugu
test:
GOTEST=1 godep go test -v ./...
usage-file:
(cd fugu && godep go build)
(cd fugu && ./fugu help > usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help build >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help run >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help exec >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help shell >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help destroy >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help push >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help pull >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help images >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help show-data >> usage.txt 2>&1)
echo "\n\n------------------------------------------\n\n" >> fugu/usage.txt
(cd fugu && ./fugu help show-labels >> usage.txt 2>&1)
release: build usage-file
.PHONY: build clean test usage-file release install