forked from JustaPenguin/assetto-server-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (40 loc) · 1.48 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
VERSION?=unstable
ifeq ($(VERSION),)
VERSION := "unstable"
endif
# enable go modules
export GO111MODULE=on
all: clean vet test assets build
install-linter:
which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.27.0
clean:
rm -rf changelog_embed.go
$(MAKE) -C cmd/server-manager clean
test:
mkdir -p cmd/server-manager/assetto/cfg
mkdir -p cmd/server-manager/assetto/results
cp -R fixtures/results/*.json cmd/server-manager/assetto/results
go test -race
vet: install-linter generate
#go vet ./...
#golangci-lint -E bodyclose,misspell,gofmt,golint,unconvert,goimports,depguard,interfacer run --skip-files content_cars_skins.go,plugin_kissmyrank_config.go,plugin_realpenalty_config.go
generate:
go get -u github.com/mjibson/esc
go generate ./...
assets:
$(MAKE) -C cmd/server-manager assets
asset-embed: generate
$(MAKE) -C cmd/server-manager asset-embed
build:
$(MAKE) -C cmd/server-manager build
deploy: clean generate vet test
$(MAKE) -C cmd/server-manager deploy
run:
$(MAKE) -C cmd/server-manager run
docker:
docker build --build-arg SM_VERSION=${VERSION} --build-arg PUID=1000 --build-arg PGID=1000 -t serverbiz/assetto-server-manager:${VERSION} .
docker push serverbiz/assetto-server-manager:${VERSION}
ifneq ("${VERSION}", "unstable")
docker tag serverbiz/assetto-server-manager:${VERSION} serverbiz/assetto-server-manager:latest
docker push serverbiz/assetto-server-manager:latest
endif