Skip to content

Commit

Permalink
Update Makefile; remove cruft
Browse files Browse the repository at this point in the history
 Fixes #25
  • Loading branch information
Trevor Rosen committed Jan 14, 2020
1 parent 4a7bf1e commit 7e20b8b
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 535 deletions.
49 changes: 9 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,52 +1,21 @@
TEST?=$$(go list ./... |grep -v 'vendor')
WEBSITE_REPO=github.com/hashicorp/terraform-website
PKG_NAME=librato
plugin_name=terraform-provider-appoptics
plugin_path=~/.terraform.d/plugins
.PHONY: build test testacc vet lint release

plugin_name=terraform-provider-appoptics

default: build

build:
go build -o $(plugin_name)

user-install:
mkdir -p $(plugin_path) && go build -o $(plugin_path)/$(plugin_name)
test:
go test ./...

test: fmtcheck
go test -i $(TEST) || exit 1
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
testacc:
TF_ACC=1 go test -v -timeout 120m

vet:
@echo "go vet ."
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
exit 1; \
fi

fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"

errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"

vendor-status:
@govendor status

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
echo "ERROR: Set TEST to a specific package. For example,"; \
echo " make test-compile TEST=./$(PKG_NAME)"; \
exit 1; \
fi
go test -c $(TEST) $(TESTARGS)

go vet ./...

.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile website website-test
lint:
"$$(go env GOPATH)/bin/golangci-lint" run

31 changes: 0 additions & 31 deletions scripts/changelog-links.sh

This file was deleted.

24 changes: 0 additions & 24 deletions scripts/errcheck.sh

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/gofmtcheck.sh

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/gogetcookie.sh

This file was deleted.

36 changes: 0 additions & 36 deletions website/docs/index.html.markdown

This file was deleted.

75 changes: 0 additions & 75 deletions website/docs/r/alert.html.markdown

This file was deleted.

71 changes: 0 additions & 71 deletions website/docs/r/metric.html.markdown

This file was deleted.

53 changes: 0 additions & 53 deletions website/docs/r/service.html.markdown

This file was deleted.

Loading

0 comments on commit 7e20b8b

Please sign in to comment.