diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 02e4205..5048dd9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,3 +40,15 @@ jobs: prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + homebrew: + name: Homebrew formula + runs-on: ubuntu-latest + steps: + - name: Bump Homebrew formula version + uses: mislav/bump-homebrew-formula-action@v1.4 + if: "!contains(github.ref, '-')" # skip prereleases + with: + formula-name: terraform-docs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/homebrew/README.md b/scripts/homebrew/README.md new file mode 100644 index 0000000..ceccfae --- /dev/null +++ b/scripts/homebrew/README.md @@ -0,0 +1,9 @@ +# Homebrew Formula + +This formula is kept here only for reference, the [official formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/terraform-docs.rb) file is located and maintained on the official [homebrew-core](https://github.com/Homebrew/homebrew-core) repository. + +To install `terraform-docs` you can simply use [Homebrew](https://brew.sh): + +``` bash +brew install terraform-docs +``` diff --git a/HomebrewFormula/terraform-docs.rb b/scripts/homebrew/terraform-docs.rb similarity index 64% rename from HomebrewFormula/terraform-docs.rb rename to scripts/homebrew/terraform-docs.rb index 96a889f..131e42d 100644 --- a/HomebrewFormula/terraform-docs.rb +++ b/scripts/homebrew/terraform-docs.rb @@ -1,28 +1,22 @@ class TerraformDocs < Formula desc "Tool to generate documentation from Terraform modules" homepage "https://github.com/segmentio/terraform-docs" - url "https://github.com/segmentio/terraform-docs/archive/v0.6.0.tar.gz" - sha256 "e52f508f5c47bcb0c9a42307cba564c66ec3a155f336b9a25557e8b0f8facaa3" + url "https://github.com/segmentio/terraform-docs/archive/v0.7.0.tar.gz" + sha256 "ec0b3b95d61a348349a34650a3535ab7165eaaa49380abbfe13d2b0b7ee067f5" bottle do cellar :any_skip_relocation - sha256 "b41eeb6f997c60a93bc8ec9bf6ad8206561f98b3d2bd464a03b388dcdf1c4676" => :mojave - sha256 "9ad7cf9b7bfe86ec62e72dc337bf020c13d48a1f97345988d3f8095ba4a6ec0b" => :high_sierra - sha256 "5c93638483229ba886dbd760b05f29754c3845ac9a839fc2760bdadae5d7ecd4" => :sierra + sha256 "fcb055e343d490f7247fdb918e6e9398ccada89e261036acbc0d2df60e5adc6d" => :catalina + sha256 "176426293dacdf4ed8f4572dd59b502adf60a64ed17ead8176a32478f4a2b969" => :mojave + sha256 "71c1705081953b0dcbed298fb61b1c413f22fa08822faf3a3ee8fc6ac42a1299" => :high_sierra end depends_on "go" => :build def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/segmentio/terraform-docs" - dir.install buildpath.children - - cd dir do - system "make", "build-darwin-amd64" - bin.install "bin/darwin-amd64/terraform-docs" - prefix.install_metafiles - end + system "make", "build" + bin.install "bin/darwin-amd64/terraform-docs" + prefix.install_metafiles end test do