Closed Jeehut closed 5 years ago
Please note that I found a much easier way to configure git hooks in my project setup, so I won't need this feature, personally. Feel free to close it if you feel like you don't want it. Sorry for reporting it first, then not actually needing it. 😅
If anyone is curious how I got it working using Beak, checkout our hooks.swift file.
I don't really know much about beak, the install script installs generic hooks which look in your config to decide if they should run or not. I think you miss the value of Komondor: it has a central & consistent way to do git hooks and is only responsible for running whatever is defined in your package.swift.
I'm not too suer what you're trying to do with the script in the OP, but I'm happy you found a way 👍
I'm just trying to use Komondor from within a Beak script, since there you can also specify SwiftPM dependencies and run them separately from the
Package.swift
file. I'm already confused because of #18 and #19, but what I also don't understand is how the definition of aconfig
parameter leads to Komondor to know what things to run? Does that mean that Komondor is parsing thePackage.swift
file and trying to find aPackageConfig
object there, I'm really confused about how this works.Here's what I'm trying at the moment using Beak:
My goal is to have both a
hooks register
and ahooks unregister
command setup which developers who checkout the project can run in order to – well, register or unregister all hooks I might define within that file. Also, how does Komondor behave when I change my hooks and re-runkommondor install
, does it remove all removed hooks and also ensure no duplicates appear in the final configured hooks?