Skip to content

Add Homebrew installer #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick note while I was looking… when we upgrade goreleaser to v0.139.0 we'll want to change this to tap https://goreleaser.com/deprecations/#brewsgithub but 👌 for now!

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to look up etc.install https://www.rubydoc.info/github/Homebrew/brew/Formula:etc interesting!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too. Took me a while to figure out how to do it. My first attempt was to copy it to $HOME/.ct, but it doesn't seem to be possible to add stuff to a user's home directory. Homebrew changes the complete environment during the installation.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad for this change. People seem to keep getting confused at the from source options


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