forked from leighmacdonald/uncledane-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (34 loc) · 925 Bytes
/
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
.PHONY: frontend
all: build
vet:
@CGO_ENABLED=0 go vet . ./...
fmt:
@CGO_ENABLED=0 go fmt . ./...
yarn_install:
@cd frontend && yarn install && cd ..
frontend:
@cd frontend && yarn run build && cp -rv src/public/* dist/ && cd ..
watch:
@cd frontend && yarn run watch && cd ..
serve:
@CGO_ENABLED=0 go run main.go
js_deps: yarn_install
build: clean fmt vet
@CGO_ENABLED=0 go build -o uncledane-web
run: build
@./uncledane-web
test:
@CGO_ENABLED=0 go test -race -cover . ./...
testcover:
@CGO_ENABLED=0 go test -race -coverprofile c.out ./...
lint:
@CGO_ENABLED=0 golangci-lint run
bench:
@CGO_ENABLED=0 go test -run=NONE -bench=. ./...
clean:
@CGO_ENABLED=0 go clean $(GO_FLAGS) -i
@rm -rf ./frontend/dist
run_image: image
@docker run --rm -p 8003:8003 -v "$(pwd)/config.yaml:/app/config.yaml" leighmacdonald/uncledane-web:latest
image:
@docker build -t leighmacdonald/uncledane-web:latest .