norwoodj / helm-docs

A tool for automatically generating markdown documentation for helm charts
GNU General Public License v3.0
1.38k stars 185 forks source link

[Feat]: git-hook #221

Open DrummyFloyd opened 8 months ago

DrummyFloyd commented 8 months ago

General Summary

shoudl be great to have in the script, the installation of the wanted binary, instead of the script that say , please install it

echo "Please install helm-docs to run the pre-commit hook! https://github.com/norwoodj/helm-docs#installation"

based on the rev wanted by pre-commit

Is your feature request related to a problem? Please describe and/or link to a bug issue.

pre-commit install --install-hook all other hook are ready to be used , once we run the command

Expected Behavior

pre-commit install --install-hook run helm-docs

Current Behavior

pre-commit install --install-hook run helm-docs

Helm Docs................................................................Failed

Possible Solution

wget the rev binary, or add it directly into the repo for each release ?

Alternatives you've considered

.

Further Information

.

DrummyFloyd commented 7 months ago

might be the solution ? => https://github.com/pre-commit/pre-commit/pull/3020

norwoodj commented 7 months ago

It's a nice idea. I'd look at a PR if you want to implement a cross-platform way of installing the binary in the script, or use some pre-commit feature to do so.

DrummyFloyd commented 7 months ago

to be be honest, it would be quite easy , if i know how to retrieve the ref key from pre-commit, but didn't find any documenttaion about this, need to dig into the code of pre-commit to check if it's possible like this we will keep the script , light as possible , you will have somethign like this

if Not preset; then
wget <url> $REF
mv <bniary> ./helm-docs
else
./helm-docs
fi