Conversation
|
I still have to add a |
asottile
left a comment
There was a problem hiding this comment.
niiiiiice
some simple tests too (we talked about this in irc)
pre_commit/languages/swift.py
Outdated
| ENVIRONMENT_DIR, 'default', | ||
| )) | ||
| cmd = helpers.to_cmd(hook) | ||
| full_binary_path = os.path.join(directory, BUILD_DIR, BUILD_CONFIG, cmd[0]) |
There was a problem hiding this comment.
instead of doing this, let's do a PATH envcontext (see any of the python / ruby / js ones for an example). Then you can just use helpers.to_cmd directly
pre_commit/languages/swift.py
Outdated
| additional_dependencies=(), | ||
| ): | ||
| directory = repo_cmd_runner.path(helpers.environment_dir( | ||
| ENVIRONMENT_DIR, 'default', |
There was a problem hiding this comment.
I would assert that the version is default since no other version is supported, there's prior art in the docker language
|
I added some commits to your branch :) |
|
\o/ |
|
Thanks and wow! |
|
🎉🎉🎉 thank you! |
|
I'll cut a release for this tomorrow |
|
Damn I'm a liar, doing this now <3 |
|
This is in 0.11.0, thanks again for an awesome contribution. Want to write up a bit in the documentation and add your name to the contributors? https://github.com/pre-commit/pre-commit.github.io (fork and base a branch off of |
|
Sure! I'll do it soon. I wanna wait for my swiftlint PRs to ship, so that I can have an example for the docs. |
|
👍 |
This implements #451.
All that's needed to build a SwiftPM package is to run
swift build. When doing this, you choose either adebugorreleasetype build, and then build artifacts/binary is stored in <build_dir>/<release|debug>. The-Cflag is just used to ensureswift buildis run with the repo as the current directory, which apparently wasn't the case when I tested the first time.