-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (29 loc) · 946 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
export PROJECT_ROOT=$(shell pwd)
export GO111MODULE=on
export GOPRIVATE="wwwin-github.cisco.com"
export GOPROXY="https://proxy.golang.org, https://${ARTIFACTORY_USER}:${ARTIFACTORY_PASSWORD}@engci-maven-master.cisco.com/artifactory/api/go/nyota-go, direct"
REPO_NAME = wwwin-github.cisco.com/eti/sre-go-helloworld
all: deps target
target:
echo "Running build"
go build
deps:
echo "Get Depedendent Modules"
go get ./...
go mod download
go mod tidy
clean:
echo "Running build"
@rm -rf coverage coverage.html
@rm sre-go-helloworld
test:
echo "Running tests"
go test -v --cover ./...
sonar: test
sonar-scanner -Dsonar.projectVersion="$(version)"
test_debug: debug_kill
@cd $(PROJECT_ROOT)
dlv test $(REPO_NAME) --headless --api-version=2 --listen "0.0.0.0:2345" --log=true
debug_kill:
-kill -9 `ps -ef | grep 'dlv debug' | grep -v grep | awk '{print $$2}'`
-kill -9 `ps -ef | grep '/debug' | grep -v grep | awk '{print $$2}'`