Skip to content

Commit 50db473

Browse files
authored
Add Homebrew installer (#244)
The Homebrew formula installs the config files to Homebrew's etc directory, so we add that to the search locations for config files. Signed-off-by: Reinhard Nägele <[email protected]>
1 parent 93b10e8 commit 50db473

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.goreleaser.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,18 @@ dockers:
5656
extra_files:
5757
- etc/chart_schema.yaml
5858
- etc/lintconf.yaml
59+
brews:
60+
- github:
61+
owner: helm
62+
name: homebrew-tap
63+
commit_author:
64+
name: helm-bot
65+
66+
folder: Formula
67+
homepage: https://github.com/helm/chart-testing/
68+
description: Testing and linting Helm charts
69+
install: |
70+
bin.install "ct"
71+
etc.install "etc" => "ct"
72+
test: |
73+
system "#{bin}/ct version"

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@ Unpack the `ct` binary, add it to your PATH, and you are good to go!
3434
A Docker image is available at `quay.io/helmpack/chart-testing` with list of
3535
available tags [here](https://quay.io/repository/helmpack/chart-testing?tab=tags).
3636

37-
### From Source
37+
### Homebrew
3838

39-
To install from head with [Go](https://golang.org) 1.14 or higher:
40-
41-
```cli
42-
go get github.com/helm/chart-testing/v3/ct
39+
```console
40+
$ brew tap helm/tap
41+
$ brew install chart-testing
4342
```
4443

45-
This will put `ct` in `$(go env GOPATH)/bin`. You may need to add that directory to your `$PATH` as shown [here](https://golang.org/doc/code.html#GOPATH) if you encounter the error `ct: command not found` after installation.
46-
4744
## Usage
4845

4946
See documentation for individual commands:

pkg/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ var (
3434
configSearchLocations = []string{
3535
".",
3636
path.Join(homeDir, ".ct"),
37+
"/usr/local/etc/ct",
3738
"/etc/ct",
3839
}
3940
)

0 commit comments

Comments
 (0)