-
Notifications
You must be signed in to change notification settings - Fork 221
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
Add Swift Plugin support #544
Comments
I've investigated and implemented the wrapper plugin approach here: https://github.com/csjones/lefthook-plugin So far, the lefthook swift plugin is working well on macOS and Linux. |
Hey @csjones, this is amazing! Do you want to keep your plugin in your repo or integrate it into lefthook repo? |
Hey @mrexox, now having tried both approaches, I'm leaning more towards the plugin in the repo I created than the lefthook repo. Should I open a PR for the changes to |
@csjones , yes, that will be great. It would be also good to add a note into |
@mrexox done! |
⚡ Summary
Thank you for making such an exceptional tool. While I primarily develop in Swift, I've recently created a wrapper plugin for Lefthook that can be included in Swift packages.
https://github.com/csjones/lefthook
Value
Direct Swift Package Manager support instead of relying on installation methods like go get, brew, npm, or gem.
Behavior and configuration changes
At minimum, the primary change would be in the
hooks.tmpl
file:Additional changes are dependent on whether it makes sense for a Swift plugin to live along side npm and rubygems implementations in this repository. This would include a
Package.swift
manifest file in the root of the repository and CI additions to create alefthook.artifactbundle.zip
file.Alternatively, I could create a wrapper plugin package that downloads the Lefthook release binaries and implements all the swift details in a separate repository.
The text was updated successfully, but these errors were encountered: