Infer podspec version from git command#545
Merged
dmbryson merged 3 commits intoswiftlang:masterfrom Aug 27, 2019
Merged
Conversation
dmbryson
approved these changes
Aug 27, 2019
Contributor
dmbryson
left a comment
There was a problem hiding this comment.
I don't have much experience with CocoaPods, but from a high level this seems reasonable to me.
Contributor
|
Doesn't this mean using llbuild from a branch would report the wrong version (latest instead of whatever the branch has)? |
Contributor
Author
|
It finds the most recent tag on the current branch. I've tested this on several different scenarios and it seemed to work okay. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to provide a better solution to 'current version' inference for
llbuildwhen used in CocoaPods directly from git.When requiring a Pod directly from git, like so:
CocoaPods relies on the
.podspecto provide the version that is then used, among other things, for dependency resolution.SwiftPM, on the other hand, relies solely on SemVer and git tags and implies no versioning in the code itself.
The two ways are ultimately incompatible, but this new approach attempts to bridge them. The main use cases:
pod trunk push, the validation will be performed for the most recent tag. If it was already pushed, an error will be raised.