-
Notifications
You must be signed in to change notification settings - Fork 59
/
Makefile
49 lines (39 loc) · 881 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
NAME := tfmigrate
.DEFAULT_GOAL := build
.PHONY: deps
deps:
go mod download
.PHONY: build
build: deps
go build -buildvcs=false -o bin/$(NAME)
.PHONY: install
install: deps
go install
.PHONY: lint
lint:
golangci-lint run ./...
.PHONY: test
test: build
go test ./...
.PHONY: generate-plugin-cache
generate-plugin-cache:
scripts/testacc/generate_plugin_cache.sh
.PHONY: testacc
testacc: build generate-plugin-cache
TEST_ACC=1 go test -count=1 -failfast -timeout=20m ./...
.PHONY: check
check: lint test
.PHONY: legacy-tfstate
legacy-tfstate:
# Generate a 0.12.31 tfstate file for use in replace-provider tests.
docker run \
--interactive \
--rm \
--tty \
--volume $(shell pwd):/src \
--workdir /src/test-fixtures/legacy-tfstate \
--entrypoint /bin/sh \
hashicorp/terraform:0.12.31 \
-c \
"terraform init && \
terraform apply -auto-approve"