-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (61 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
77 lines (61 loc) · 1.89 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
SHELL := /usr/bin/env bash
GO ?= go
BIN := bin
PKGS := ./...
.PHONY: all
all: build
.PHONY: tidy
tidy:
$(GO) mod tidy
.PHONY: fmt
fmt:
$(GO) fmt $(PKGS)
.PHONY: vet
vet:
$(GO) vet $(PKGS)
$(GO) vet -tags acceptance $(PKGS)
.PHONY: build
build:
mkdir -p $(BIN)
$(GO) build -o $(BIN)/terraform-provider-routeros .
.PHONY: test
test:
$(GO) test -count=1 -race $(PKGS)
.PHONY: testacc
testacc:
TF_ACC=1 ROUTEROS_RUN_DESTRUCTIVE_ACTIONS=1 \
$(GO) test -tags acceptance -count=1 -timeout 120m ./internal/provider/... -v
.PHONY: release-snapshot
release-snapshot:
goreleaser release --snapshot --clean --skip=publish,sign
.PHONY: release
release:
@# Tag the release first: git tag -s vX.Y.Z -m '...'
@# Requires GPG_FINGERPRINT in env for signing.
goreleaser release --clean
.PHONY: clean
clean:
rm -rf $(BIN) dist
# --- live-device conformance -------------------------------------------------
# Needs ROUTEROS_HOST / ROUTEROS_USER / ROUTEROS_PASSWORD.
.PHONY: audit
audit:
python3 tools/conformance/schema_audit.py all
# Dump a device's menu tree for hardware the maintainers do not have.
# Names and structure only: no values, no counts. See COLLECTING.md.
.PHONY: collect
collect:
@python3 tools/conformance/collect_schema.py $(COLLECT_ARGS)
.PHONY: dms-backup dms-install dms-arm dms-disarm dms-verify dms-remove
dms-backup: ; tools/conformance/deadman.sh backup
dms-install: ; tools/conformance/deadman.sh install
dms-arm: ; tools/conformance/deadman.sh arm
dms-disarm: ; tools/conformance/deadman.sh disarm
dms-verify: ; tools/conformance/deadman.sh verify
dms-remove: ; tools/conformance/deadman.sh remove
.PHONY: conformance-manifest conformance
conformance-manifest:
python3 tools/conformance/gen_manifest.py > internal/provider/testdata/conformance.json
conformance:
TF_ACC=1 $(GO) test -tags acceptance -count=1 -timeout 180m \
-run TestAccConformanceSweep ./internal/provider/ -v