forked from ddelnano/terraform-provider-mikrotik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (38 loc) · 1009 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.PHONY: build generate clean plan apply lint-client lint-provider lint testacc testclient test
TIMEOUT ?= 40m
ROUTEROS_VERSION ?= "6.48.3"
ifdef TEST
override TEST := ./... -run $(TEST)
else
override TEST := ./...
endif
ifdef TF_LOG
override TF_LOG := TF_LOG=$(TF_LOG)
endif
build:
go build -o terraform-provider-mikrotik
generate:
go generate ./...
clean:
rm dist/*
plan: build
terraform init
terraform plan
apply:
terraform apply
lint-client:
go vet ./client/...
lint-provider:
go vet ./mikrotik/...
lint: lint-client lint-provider
test: lint testclient testacc
testclient:
cd client; go test $(TEST) -race -v -count 1
testacc:
TF_ACC=1 $(TF_LOG) go test $(TEST) -v -count 1 -timeout $(TIMEOUT)
routeros: routeros-clean
ROUTEROS_VERSION=$(ROUTEROS_VERSION) docker compose -f docker/docker-compose.yml up -d routeros
routeros-stop:
docker compose -f docker/docker-compose.yml stop routeros
routeros-clean:
docker compose -f docker/docker-compose.yml rm -sfv routeros