forked from dell/csi-powerscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (45 loc) · 1.09 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
57
58
all: clean build
# Tag parameters
MAJOR=1
MINOR=0
PATCH=0
NOTES=
TAGMSG="CSI Spec 1.0"
clean:
rm -f core/core_generated.go
go clean
check:
@./check.sh
format:
@gofmt -w -s .
build:
go generate
@./check.sh
GOOS=linux CGO_ENABLED=0 go build
install:
go generate
GOOS=linux CGO_ENABLED=0 go install
# Tags the release with the Tag parameters set above
tag:
-git tag -d v$(MAJOR).$(MINOR).$(PATCH)$(NOTES)
git tag -a -m $(TAGMSG) v$(MAJOR).$(MINOR).$(PATCH)$(NOTES)
# Generates the docker container (but does not push)
docker:
# go generate
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk docker
# Pushes container to the repository
push: docker
make -f docker.mk push
# Windows or Linux; requires no hardware
unit-test:
( cd service; go clean -cache; go test -v -coverprofile=c.out ./... )
# Linux only; populate env.sh with the hardware parameters
integration-test:
( cd test/integration; sh run.sh )
version:
go generate
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk version
gosec:
gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...