forked from fordevio/wharf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (30 loc) · 1.19 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
build: get
@go build -o bin/build ./cmd && rm -rf ./static && npm --prefix ./client run build
get:
@go mod download && npm --prefix ./client install
runFrontend: get
@npm --prefix ./pkg/client start
run:
@./bin/build
format: get
@gofmt -w . && npm --prefix ./client run format
dockerImage:
@docker build -t wharf -f deployment/Dockerfile .
testDockerImage:
@docker build -t wharf-test -f test/intrument_sample_app/Dockerfile .
test-integration: testDockerImage
@docker run --rm wharf-test -v /var/run/docker.sock:/var/run/docker.sock -it wharf-test
runDockerWharf:
@docker run --name wharf -v /var/lib/wharf:/var/lib/wharf -v /var/run/docker.sock:/var/run/docker.sock -dp 9001:9001 wharf
test-unit: get
@go test -v ./pkg/...
help:
@echo "Available commands:"
@echo " make build - Build the application"
@echo " make dockerImage - Build docker image"
@echo " make run - Run the application"
@echo " make runFrontend - Run the frontend on port 3000"
@echo " make get - Install dependencies"
@echo " make format - Format code"
@echo " make test-unit - Run all unit test"
@echo " make help - Show this help message"