feat: Begin cleaning up cli-client for better separation for current and next versions.
All checks were successful
CI / Ubuntu (push) Successful in 2m33s
All checks were successful
CI / Ubuntu (push) Successful in 2m33s
This commit is contained in:
@@ -96,10 +96,14 @@ public extension CliClient.SharedOptions {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Add optional property for currentVersion (loaded version from file)
|
||||
// and rename version to nextVersion.
|
||||
|
||||
@_spi(Internal)
|
||||
public struct CurrentVersionContainer: Sendable {
|
||||
|
||||
let targetUrl: URL
|
||||
let currentVersion: CurrentVersion?
|
||||
let version: Version
|
||||
|
||||
var usesOptionalType: Bool {
|
||||
@@ -109,8 +113,15 @@ public struct CurrentVersionContainer: Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public enum CurrentVersion: Sendable {
|
||||
case branch(String, usesOptionalType: Bool)
|
||||
case semvar(SemVar, usesOptionalType: Bool)
|
||||
}
|
||||
|
||||
public enum Version: Sendable {
|
||||
// TODO: Call this branch for consistency.
|
||||
case string(String)
|
||||
// TODO: Remove has changes when currentVersion/nextVersion is implemented.
|
||||
case semvar(SemVar, usesOptionalType: Bool = true, hasChanges: Bool)
|
||||
|
||||
func string(allowPreReleaseTag: Bool) throws -> String {
|
||||
|
||||
Reference in New Issue
Block a user