forked from Mesomorphic/terraform-provider-confluence
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
44 lines (32 loc) · 869 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
PKG_NAME=confluence
BINARY_NAME=terraform-provider-confluence
INSTALL_DIR=$(HOME)/.terraform.d/plugins
VERSION=$$(cat VERSION)
TEST?=$$(go list ./...)
GOFMT_FILES?=$$(find . -name '*.go')
all: check test build
check: bin/golangci-lint
bin/golangci-lint run
test:
go test -i $(TEST) || exit 1
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
build: $(BINARY_NAME)
$(BINARY_NAME):
go build -v -o $(BINARY_NAME)
testacc:
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 5m
fmt:
gofmt -s -w $(GOFMT_FILES)
clean:
rm -rf bin
rm -rf site
rm -f $(BINARY_NAME)
install: $(BINARY_NAME)
mkdir -p $(INSTALL_DIR)
cp $(BINARY_NAME) $(INSTALL_DIR)/$(BINARY_NAME)_v$(VERSION)
uninstall:
rm -f $(INSTALL_DIR)/$(BINARY_NAME)
bin/golangci-lint:
scripts/get-golangci.sh
.PHONY: all build check clean fmt install test testacc uninstall