Opt out of git commit from SpmDependencyManager?
See original GitHub issueHi team, would it make sense to make the git commit
something I can opt out with SpmDependencyManager?
I’d like to manage my own workflow for adding changes, committing and pushing and I’m not sure how else to work around these lines https://github.com/touchlab/KMMBridge/blob/7acb53bcdfbc0fc8790378b07259580ab96f4f1b/kmmbridge/src/main/kotlin/dependencymanager/SpmDependencyManager.kt#L52-L54
Thank you!
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
git-commit Documentation - Git
git -commit - Record changes to the repository ... The content to be committed can be specified in several ways: by using git-add[1]...
Read more >Explicitly opt-in instead of opt-out #468 - typicode/husky - GitHub
I expect a Git commit to take in the order of 10s of milliseconds (maybe ... There should be a way to set...
Read more >How (and why!) to keep your Git commit history clean - GitLab
Command breakdown: Here, we're asking the git commit command to amend whatever changes are present in stage to the most recent commit.
Read more >git commit --amend -F option help
We are using git commit -F option to commit in git. when we use git commit --amend option with -F it is ......
Read more >Highlights from Git 2.24 | The GitHub Blog
Now in Git 2.24, commit graphs are enabled by default, meaning that your repository will see an improvement the next time you run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yeah, there are a bunch of reasons, personally I’d put “separation of responsibilities” more broadly as the first one. On a first thought, I wouldn’t expect this library to do more than the 3 things I mentioned (build xcframework, upload and edit Package.swift). It’s nice that it goes beyond that, but those would ideally be opt-in imho. Making them opt-out works too, but to my initial point, I wouldn’t expect to have to look into how to disable things I didn’t expect this tool would do for me.
Now, being more specific, referencing this block again: https://github.com/touchlab/KMMBridge/blob/7acb53bcdfbc0fc8790378b07259580ab96f4f1b/kmmbridge/src/main/kotlin/dependencymanager/SpmDependencyManager.kt#L52-L54
kmmBridgePublish
that should fail the entire build and not push/tag anything, but given that always happens from inside the task, either the task would have to fit a particular position in my workflow (which may not always be possible) or require workarounds that have to carry on knowledge on howkmmBridgePublish
works internally regarding the git commands. So it’d seem a generally cleaner solution if I could skip the whole git manipulation and control it myself, explicitly without assumed external knowledge.I think that’s about it for SpmDependencyManager specifically. I had similar issues with the available VersionManagers, but that was super easy to fix given I was able to implement the interface myself and customize the way I want in a couple of lines. In short, I didn’t want the version manager to be responsible for inferring my next release version and pushing a tag.
Thanks @russhwolf !
We don’t have it well documented yet, but you can now do
spm(commitManually = true)
to suppress the git operations for SPM publishing. You’re then responsible for commiting package file updates and tagging the release.