-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
20 lines (17 loc) · 1006 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
DEP_XRAYAWS=$(shell cat xrayaws/go.mod | grep -v module | grep github.com/shogo82148/aws-xray-yasdk-go | cut -d' ' -f2)
DEP_XRAYAWS_V2=$(shell cat xrayaws-v2/go.mod | grep -v module | grep github.com/shogo82148/aws-xray-yasdk-go | cut -d' ' -f2)
.PHONEY: test
test:
go test -race -v -coverprofile=profile.cov ./...
.PHONEY: test-xrayaws
test-xrayaws:
# Take care of Multi-Module Repositories
# ref. https://github.com/golang/go/wiki/Modules#faqs--multi-module-repositories
cd xrayaws && go mod edit -replace github.com/shogo82148/aws-xray-yasdk-go@${DEP_XRAYAWS}=../ && \
go test -race -v -coverprofile=profile.cov ./... && \
go mod edit -dropreplace github.com/shogo82148/aws-xray-yasdk-go@${DEP_XRAYAWS}
.PHONEY: test-xrayaws-v2
test-xrayaws-v2:
cd xrayaws-v2 && go mod edit -replace github.com/shogo82148/aws-xray-yasdk-go@${DEP_XRAYAWS_V2}=../ && \
go test -race -v -coverprofile=profile.cov ./... && \
go mod edit -dropreplace github.com/shogo82148/aws-xray-yasdk-go@${DEP_XRAYAWS_V2}