forked from zorchenhimer/MovieNight
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
52 lines (36 loc) · 1.45 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
# If a different version of Go is installed (via `go get`) set the GO_VERSION
# environment variable to that version. For example, setting it to "1.13.7"
# will run `go1.13.7 build [...]` instead of `go build [...]`.
#
# For info on installing extra versions, see this page:
# https://golang.org/doc/install#extra_versions
# goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows"
# goarchList = "386 amd64 amd64p32 arm arm64 ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32leppc s390 s390x sparc sparc64"
# Windows needs the .exe extension.
ifeq ($(OS),Windows_NT)
EXT=.exe
endif
TAGS=
.PHONY: fmt vet get clean dev setdev test docker ServerMovieNight
all: fmt vet test MovieNight settings.json
server: ServerMovieNight
ServerMovieNight: *.go common/*.go
GOOS=${TARGET} GOARCH=${ARCH} go$(GO_VERSION) build -o MovieNight $(TAGS)
setdev:
$(eval export TAGS=-tags "dev")
dev: setdev all
MovieNight: *.go common/*.go
GOOS=${TARGET} GOARCH=${ARCH} go$(GO_VERSION) build -o MovieNight${EXT} $(TAGS)
clean:
-rm MovieNight${EXT}
fmt:
gofmt -w .
vet:
go$(GO_VERSION) vet $(TAGS) ./...
test:
go$(GO_VERSION) test $(TAGS) ./...
docker: fmt vet MovieNight settings.json
# Do not put settings_example.json here as a prereq to avoid overwriting
# the settings if the example is updated.
settings.json:
cp settings_example.json settings.json