enhance: Bump homebrew formula version on release (#135)

* Bump homebrew formula version on release

* Add readme to homebrew folder for more information
This commit is contained in:
Khosrow Moossavi
2019-12-20 17:00:42 -05:00
committed by GitHub
parent 2e6493c8bb
commit fa8a756962
3 changed files with 29 additions and 14 deletions

View File

@@ -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 }}

View File

@@ -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
```

View File

@@ -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