forked from vesoft-inc/k6-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (28 loc) · 1.06 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
all: build
.PHONY: build
pairs := darwin/amd64 linux/amd64 linux/arm64
GOPATH ?= ~/go
export GO111MODULE=on
VERSION ?= v0.0.8
K6_VERSION ?= v0.33.0
build:
go install github.com/k6io/xk6/cmd/[email protected]
$(GOPATH)/bin/xk6 build $(K6_VERSION) --with github.com/vesoft-inc/k6-plugin@$(VERSION);
build-all: build-arm-v7
go install github.com/k6io/xk6/cmd/[email protected]
for pair in $(pairs);do echo $$pair; \
os=`echo $$pair | cut -d / -f 1 ` ;\
arch=`echo $$pair | cut -d / -f 2 ` ;\
GOOS=$$os GOARCH=$$arch $(GOPATH)/bin/xk6 build $(K6_VERSION) --with github.com/vesoft-inc/k6-plugin@$(VERSION) ;\
mv k6 k6-$$os-$$arch; \
done
build-arm-v7:
go install github.com/k6io/xk6/cmd/[email protected]
GOOS=linux GOARCH=arm64 GOARM=7 $(GOPATH)/bin/xk6 build $(K6_VERSION) --with github.com/vesoft-inc/k6-plugin@$(VERSION);
mv k6 k6-linux-arm64-v7
build-dev:
go install github.com/k6io/xk6/cmd/[email protected]
$(GOPATH)/bin/xk6 build $(K6_VERSION) --with github.com/vesoft-inc/k6-plugin@latest=${PWD}/../k6-plugin;
.PHONY: format
format:
find . -name '*.go' -exec gofmt -s -w {} +