Skip to content

Commit

Permalink
Merge pull request #2 from chanzuckerberg/master
Browse files Browse the repository at this point in the history
Updates from upstream
  • Loading branch information
velppa authored May 4, 2020
2 parents 17c22dc + 58f5f3d commit 102e52a
Show file tree
Hide file tree
Showing 2,572 changed files with 1,961 additions and 782,592 deletions.
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Feel free to delete comments as you fill this in -->

<!-- summary of changes -->

## Test Plan
<!-- detail ways in which this PR has been tested or needs to be tested -->
* [ ] acceptance tests
<!-- add more below if you think they are relevant -->
* [ ]

## References
<!-- issues documentation links, etc -->

*
7 changes: 0 additions & 7 deletions .gometalinter.json

This file was deleted.

6 changes: 3 additions & 3 deletions .goreleaser.prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ builds:
ldflags:
- "-w -s -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.GitSha={{.Commit}} -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.Version={{.Version}} -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.Dirty={{.Env.DIRTY}}"

archive:
files:
- none*
archives:
- files:
- none*

release:
prerelease: true
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ builds:
ldflags:
- "-w -s -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.GitSha={{.Commit}} -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.Version={{.Version}} -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.Dirty={{.Env.DIRTY}}"

archive:
files:
archives:
- files:
- none*

release:
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ matrix:
- name: docs check
script:
- make check-docs
- name: modules check
script:
- make check-mod
- name: linter check
script:
- make lint-ci
25 changes: 18 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export DIRTY=$(shell if `git diff-index --quiet HEAD --`; then echo false; else
# TODO add release flag
LDFLAGS=-ldflags "-w -s -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.GitSha=${SHA} -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.Version=${VERSION} -X github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version.Dirty=${DIRTY}"
export BASE_BINARY_NAME=terraform-provider-snowflake_v$(VERSION)
export GOFLAGS=-mod=vendor
export GO111MODULE=on

all: test docs install
Expand All @@ -16,15 +15,15 @@ setup: ## setup development dependencies
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh
.PHONY: setup

lint: ## run the fast go linters
lint: fmt ## run the fast go linters
./bin/reviewdog -conf .reviewdog.yml -diff "git diff master"
.PHONY: lint

lint-ci: ## run the fast go linters
./bin/reviewdog -conf .reviewdog.yml -reporter=github-pr-review
.PHONY: lint-ci

lint-all: ## run the fast go linters
lint-all: fmt ## run the fast go linters
# doesn't seem to be a way to get reviewdog to not filter by diff
./bin/golangci-lint run
.PHONY: lint-all
Expand Down Expand Up @@ -55,11 +54,11 @@ coverage: ## run the go coverage tool, reading file coverage.out
go tool cover -html=coverage.txt
.PHONY: coverage

test: deps ## run the tests
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
test: fmt deps ## run the tests
go test -race -coverprofile=coverage.txt -covermode=atomic $(TESTARGS) ./...
.PHONY: test

test-acceptance: deps ## runs all tests, including the acceptance tests which create and destroys real resources
test-acceptance: fmt deps ## runs all tests, including the acceptance tests which create and destroys real resources
SKIP_WAREHOUSE_GRANT_TESTS=1 SKIP_SHARE_TESTS=1 SKIP_MANAGED_ACCOUNT_TEST=1 TF_ACC=1 go test -v -coverprofile=coverage.txt -covermode=atomic $(TESTARGS) ./...
.PHONY: test-acceptance

Expand All @@ -69,7 +68,6 @@ test-acceptance-ci: ## runs all tests, including the acceptance tests which crea

deps:
go mod tidy
go mod vendor
.PHONY: deps

install: ## install the terraform-provider-snowflake binary in $GOPATH/bin
Expand All @@ -81,6 +79,10 @@ install-tf: build ## installs plugin where terraform can find it
cp ./$(BASE_BINARY_NAME) $(HOME)/.terraform.d/plugins/$(BASE_BINARY_NAME)
.PHONY: install-tf

uninstall-tf: build ## uninstalls plugin from where terraform can find it
rm $(HOME)/.terraform.d/plugins/$(BASE_BINARY_NAME) 2>/dev/null
.PHONY: install-tf

help: ## display help for this makefile
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help
Expand All @@ -98,3 +100,12 @@ docs: build ## generate some docs
check-docs: build ## check that docs have been generated
./scripts/update-readme.sh check
.PHONY: check-docs

check-mod:
go mod tidy
git diff --exit-code -- go.mod go.sum
.PHONY: check-mod

fmt:
goimports -w -d $$(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./dist/*")
.PHONY: fmt
Loading

0 comments on commit 102e52a

Please sign in to comment.