touchlab / KMMBridge

KMMBridge is a tool that helps publish Kotlin Multiplatform (KMP) Xcode binaries for use from Swift Package Manager (SPM) and CocoaPods.
https://touchlab.co/kmmbridge/
Apache License 2.0
358 stars 20 forks source link

Refactors to tag-based publishing #178

Closed russhwolf closed 1 year ago

russhwolf commented 1 year ago

Centralize some internal git logic. Push a temporary tag to mark in-progress publishing. Plugin should now recover better when publishing fails or is interrupted mid-stream.

kpgalligan commented 1 year ago

I don't yet have concrete "changes" to suggest, but it feels like at this point that we're maintaining more of the appearance of abstractions between the version managers and dependency managers. For example, I think if you only used cocoapods and git tag version manager, you'd break versions because spm writes the "final" version. Because we're mixing stuff in various places, though, it's rather hard to follow the logic. some of the calls are from the main class, some from dependency managers, some from version managers. I think the concept makes sense, as discussed (write temp tags), but since only the git tag based managers care about the git versions, we maybe want to keep that logic there, or maybe move it all to the main class. Not sure. I want to come back at it with fresh eyes tomorrow.

kpgalligan commented 1 year ago

Had intended a relatively quick hack as proof of concept, but kept pulling the thread out. I have not run this at all. Just moved stuff to keep git operations centralized so they can be managed and disabled more directly. https://github.com/touchlab/KMMBridge/pull/185

samhill303 commented 1 year ago

Status update: Will be merged with #185 once it's ready