diff --git a/GNUmakefile b/GNUmakefile index e2401edc38..8e75ba9b6b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -7,8 +7,6 @@ PKG_NAME=mongodbatlas BINARY_NAME=terraform-provider-mongodbatlas DESTINATION=./bin/$(BINARY_NAME) -WEBSITE_REPO=github.com/hashicorp/terraform-website - GOFLAGS=-mod=vendor GOOPTS="-p 2" @@ -59,10 +57,6 @@ fmt: fmtcheck: # Currently required by tf-deploy compile @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" -.PHONY: websitefmtcheck -websitefmtcheck: - @sh -c "'$(CURDIR)/scripts/websitefmtcheck.sh'" - .PHONY: lint-fix lint-fix: @echo "==> Fixing linters errors..." @@ -79,7 +73,7 @@ tools: ## Install dev tools @echo "==> Installing dependencies..." go install github.com/icholy/gomajor@latest go install github.com/client9/misspell/cmd/misspell@latest - go install github.com/terraform-linters/tflint@v0.48.0 + go install github.com/terraform-linters/tflint@v0.49.0 go install github.com/rhysd/actionlint/cmd/actionlint@latest go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_VERSION) @@ -96,31 +90,14 @@ test-compile: fi go test -c $(TEST) $(TESTARGS) -.PHONY: website -website: -ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) - echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." - git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) -endif - @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) - .PHONY: website-lint website-lint: @echo "==> Checking website against linters..." @misspell -error -source=text website/ -.PHONY: website-test -website-test: -ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) - echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." - git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) -endif - @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) - -.PHONY: terratest -terratest: fmtcheck - @$(eval VERSION=acc) - go test $$(go list ./... | grep /integrationtesting) -v -parallel 20 $(TESTARGS) -timeout 120m -cover -ldflags="$(LINKER_FLAGS)" +.PHONY: website +website: + @echo "Use this site to preview markdown rendering: https://registry.terraform.io/tools/doc-preview" .PHONY: tflint tflint: fmtcheck diff --git a/scripts/changelog-links.sh b/scripts/changelog-links.sh deleted file mode 100755 index f9a7584f7f..0000000000 --- a/scripts/changelog-links.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# This script rewrites [GH-nnnn]-style references in the CHANGELOG.md file to -# be Markdown links to the given github issues. -# -# This is run during releases so that the issue references in all of the -# released items are presented as clickable links, but we can just use the -# easy [GH-nnnn] shorthand for quickly adding items to the "Unrelease" section -# while merging things between releases. - -set -e - -if [[ ! -f CHANGELOG.md ]]; then - echo "ERROR: CHANGELOG.md not found in pwd." - echo "Please run this from the root of the terraform provider repository" - exit 1 -fi - -if [[ $(uname) == "Darwin" ]]; then - echo "Using BSD sed" - SED="sed -i.bak -E -e" -else - echo "Using GNU sed" - SED="sed -i.bak -r -e" -fi - -PROVIDER_URL="https:\/\/github.com\/terraform-providers\/terraform-provider-mongodbatlas\/issues" - -$SED "s/GH-([0-9]+)/\[#\1\]\($PROVIDER_URL\/\1\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md - -rm CHANGELOG.md.bak \ No newline at end of file diff --git a/scripts/gogetcookie.sh b/scripts/gogetcookie.sh deleted file mode 100755 index 9fe1de4c24..0000000000 --- a/scripts/gogetcookie.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -touch ~/.gitcookies -chmod 0600 ~/.gitcookies - -git config --global http.cookiefile ~/.gitcookies - -tr , \\t <<\__END__ >>~/.gitcookies -.googlesource.com,TRUE,/,TRUE,2147483647,o,git-paul.hashicorp.com=1/z7s05EYPudQ9qoe6dMVfmAVwgZopEkZBb1a2mA5QtHE -__END__ \ No newline at end of file diff --git a/scripts/websitefmtcheck.sh b/scripts/websitefmtcheck.sh deleted file mode 100755 index 21c910387b..0000000000 --- a/scripts/websitefmtcheck.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -eou pipefail - -npm list codedown > /dev/null 2>&1 || npm install --no-save codedown > /dev/null 2>&1 - -problems=false -while IFS= read -r -d '' f; do - if [ "${1-}" = "diff" ]; then - echo "$f" - < "$f" node_modules/.bin/codedown hcl | terraform fmt -diff=true - - else - < "$f" node_modules/.bin/codedown hcl | terraform fmt -check=true - || { problems=true && echo "Formatting errors in $f"; } - fi -done < <(find website -name '*.markdown' -print0) - -if [ "$problems" = true ] ; then - exit 1 -fi