-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 815 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
NAME=lightdash
VERSION=$(shell cat VERSION)
BINARY=terraform-provider-$(NAME)_v$(VERSION)
default: install
setup:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh
go get golang.org/x/tools/cmd/goimports
build:
go build -ldflags "-w -s" -o $(BINARY) .
install: build
mkdir -p $(HOME)/.terraform.d/plugins
mv ./$(BINARY) $(HOME)/.terraform.d/plugins/$(BINARY)
doc:
go get github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
test: deps
go test -mod=readonly -count=1 ./...
test-acceptance: deps
TF_ACC=1 go test -mod=readonly -count=1 ./...
check-docs: docs
git diff --exit-code -- docs
deps:
go mod tidy
release:
git tag "v$(VERSION)"
git push origin "v$(VERSION)"
fmt:
go fmt ./...