This refactors the code to improve testability and so that it can be better integrated into an upcoming GitHub app.
- [x] Rename the binary to `cr` (similar to `ct` for chart-testing) and update package structure along with that
- [x] Fix incorrect license headers
- [x] Change default config file locations (analogous to chart-testing)
- [x] Refactor index and release creation and introduce new Releaser struct
- [x] Simplify error handling. In particul, I think we should not try and parse GitHub specific error codes. This doesn't gain us anything. The best we can do is log errors and exit
- [x] No longer check if a release already exists. Just try and create it which will fail if the release exists. So, the result is basically the same with less code
- [x] No longer download chart packages for index creation. This is unnecessary and does not scale
- [x] Remove `Chart.yaml` from releasse assets. Its unnecessary and make things more complicated
- [x] Encapsulate GitHub API within package without exposing it
- [x] Expect all charts to be released in a specific directory removing the recursive option
- [x] Add unit tests
Fixes: #18
* Remove committed vendor dir
* Ignore vendor dir, and dist dir for goreleaser
* Automate goreleaser with CircleCI
* Add goreleaser file. Use before hooks for dep and strip from circle file
* Update the README with how to install, and for contribution how to build
* Prefer v tag prefix, until we decide otherwise
* Remove extra elipses
* Remove shortened url, and pin goreleaser version
Fixes #13
Signed-off-by: Scott Rigby <scott@r6by.com>
* Refactor config loading to config package
* Bind flags to viper
* No longer mark flags as required so environment variables,
config files, and flags can be arbitrarily combined. Instead,
validate the final options struct
* Use CH_ prefix for environment variables
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>