-
Notifications
You must be signed in to change notification settings - Fork 19
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
Semver class implementation #523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! Just some comments.
private var major: Int64 | ||
private var minor: Int64 | ||
private var patch: Int64 | ||
private var major: Int64 = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about replacing this values by a struct like:
struct SemverModel {
let major: Int64
let minor: Int64
let patch: Int64
...
}
|
||
return (major, minor, patch) | ||
} | ||
|
||
private func setVersion() -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a function toString()
from SemverModel
Split/Matchers/Semver/Semver.swift
Outdated
return metadataString | ||
} | ||
|
||
private func getAndRemovePreReleaseIfExists(_ vWithoutMetadata: String) throws -> (preRelease: [String], isStable: Bool, versionWithoutPreRelease: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can use the model here too:
func versionWithoutPreRelease(withoutMetaData: String) throws -> SemverModel {
iOS SDK
What did you accomplish?