Skip to content

Commit

Permalink
Add Homebrew installer (#244)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
unguiculus authored Jul 24, 2020
1 parent 93b10e8 commit 50db473
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
15 changes: 15 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,18 @@ dockers:
extra_files:
- etc/chart_schema.yaml
- etc/lintconf.yaml
brews:
- github:
owner: helm
name: homebrew-tap
commit_author:
name: helm-bot
email: [email protected]
folder: Formula
homepage: https://github.com/helm/chart-testing/
description: Testing and linting Helm charts
install: |
bin.install "ct"
etc.install "etc" => "ct"
test: |
system "#{bin}/ct version"
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@ Unpack the `ct` binary, add it to your PATH, and you are good to go!
A Docker image is available at `quay.io/helmpack/chart-testing` with list of
available tags [here](https://quay.io/repository/helmpack/chart-testing?tab=tags).

### From Source
### Homebrew

To install from head with [Go](https://golang.org) 1.14 or higher:

```cli
go get github.com/helm/chart-testing/v3/ct
```console
$ brew tap helm/tap
$ brew install chart-testing
```

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.

## Usage

See documentation for individual commands:
Expand Down
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var (
configSearchLocations = []string{
".",
path.Join(homeDir, ".ct"),
"/usr/local/etc/ct",
"/etc/ct",
}
)
Expand Down

0 comments on commit 50db473

Please sign in to comment.