-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (45 loc) · 1.02 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
55
56
NAME:=csi-unity
.PHONY: all
all: go-build
ifneq (on,$(GO111MODULE))
export GO111MODULE := on
endif
.PHONY: go-vendor
go-vendor:
git config core.hooksPath hooks
go mod vendor
.PHONY: go-build
go-build: go-vendor
rm -f core/core_generated.go
cd core && go generate
go build .
# Integration tests using Godog. Populate env.sh with the hardware parameters
integration-test:
( cd test/integration-test; sh run.sh )
# Unit tests using Godog. Populate env.sh with the hardware parameters
unit-test:
( cd test/unit-test; sh run.sh )
#
# Docker-related tasks
#
# Generates the docker container (but does not push)
docker-build: go-build
cd core && go generate
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk docker-build
docker-push:
make -f docker.mk docker-push
version:
go generate
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk version
.PHONY: clean
clean:
rm -rf bin
rm -f core/core_generated.go
go clean
#
# Tests-related tasks
.PHONY: integ-test
integ-test: go-build
go test -v ./test/...