diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0de7976 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,25 @@ +root = true + +; Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 + +; Golang +[*.go] +indent_style = tab +indent_size = 4 + +; YAML +[*.{yaml,yml}] +indent_style = space +indent_size = 2 + +[{Makefile,GNUmakefile}] +indent_style = tab +indent_size = 4 diff --git a/Makefile b/Makefile index 5f6416d..b4b06fe 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ build-gox: deps fmtcheck vet release: go get github.com/goreleaser/goreleaser; \ - scripts/release.sh; \ + goreleaser; \ deps: go get -u github.com/mitchellh/gox @@ -45,4 +45,4 @@ vet: exit 1; \ fi -.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile \ No newline at end of file +.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile diff --git a/goreleaser.yml.template b/goreleaser.yml similarity index 54% rename from goreleaser.yml.template rename to goreleaser.yml index 236f355..4f5e86b 100644 --- a/goreleaser.yml.template +++ b/goreleaser.yml @@ -1,13 +1,11 @@ builds: - - binary: terraform-provider-runscope_$VERSION + - binary: terraform-provider-runscope_v{{.Version}} goos: - darwin - linux - windows goarch: - amd64 - hooks: - post: ./scripts/goreleaser-post.sh archive: format: zip files: \ No newline at end of file diff --git a/scripts/goreleaser-post.sh b/scripts/goreleaser-post.sh deleted file mode 100755 index b2400c4..0000000 --- a/scripts/goreleaser-post.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -ex -VERSION=$(git describe --abbrev=0) -find dist/ -name terraform-provider-runscope_$VERSION | xargs chmod +x \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh deleted file mode 100755 index a459101..0000000 --- a/scripts/release.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -ex -export VERSION=$(git describe --abbrev=0) -echo $VERSION -goreleaser --config <(envsubst '$VERSION' < ./goreleaser.yml.template) \ No newline at end of file