-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
27 lines (23 loc) · 876 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
NAMESPACE=circa10a
PROVIDER_NAME=mcbroken
PROVIDER_FULL_PATH=$(REGISTRY)/$(NAMESPACE)/$(PROVIDER_NAME)
PROVIDER_FULL_NAME=terraform-provider-$(PROVIDER_NAME)
PROJECT=$(NAMESPACE)/$(PROVIDER_FULL_NAME)
VERSION=$(shell git describe --abbrev=0 --tags | sed 's/v//')
build-mac: PLUGIN_DIR = ~/.terraform.d/plugins/local/provider/$(PROVIDER_NAME)/$(VERSION)/darwin_amd64
build-mac:
test -d $(PLUGIN_DIR) || mkdir -p $(PLUGIN_DIR)
go build -o $(PLUGIN_DIR)/$(PROVIDER_FULL_NAME)
build-linux: PLUGIN_DIR = ~/.terraform.d/plugins/local/provider/$(PROVIDER_NAME)/$(VERSION)/linux_amd64
build-linux:
test -d $(PLUGIN_DIR) || mkdir -p $(PLUGIN_DIR)
go build -o $(PLUGIN_DIR)/$(PROVIDER_FULL_NAME)
test: export TF_ACC=true
test:
go test -v ./...
lint:
@if ! command -v golangci-lint 1>/dev/null; then\
echo "Need to install golangci-lint";\
exit 1;\
fi;\
golangci-lint run