Skip to content

Commit 15db71f

Browse files
authored
prepare to move Versionig back to SwiftPM (#188)
motivation: the logic in Versioning does not belong in TSC, its a SwiftPM concern changes: * mark Versioning as deprecated, this will move to SwiftPM * mark convertTagsToVersionMap as deprecated, this will move to SwiftPM
1 parent 395e7fb commit 15db71f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Sources/TSCUtility/Git.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ import class Foundation.ProcessInfo
1212
import TSCBasic
1313

1414
extension Version {
15-
/// Try a version from a git tag.
16-
///
17-
/// - Parameter tag: A version string possibly prepended with "v".
15+
// FIXME: deprecate 2/2021 (used below), remove once clients transitioned
16+
@available(*, deprecated, message: "moved to SwiftPM")
1817
init?(tag: String) {
1918
if tag.first == "v" {
2019
self.init(string: String(tag.dropFirst()))
@@ -24,8 +23,9 @@ extension Version {
2423
}
2524
}
2625

27-
public class Git {
28-
/// Compute the version -> tags mapping from a list of input `tags`.
26+
public enum Git {
27+
// FIXME: deprecate 2/2021, remove once clients transitioned
28+
@available(*, deprecated, message: "moved to SwiftPM")
2929
public static func convertTagsToVersionMap(_ tags: [String]) -> [Version: [String]] {
3030
// First, check if we need to restrict the tag set to version-specific tags.
3131
var knownVersions: [Version: [String]] = [:]

Sources/TSCUtility/Versioning.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
@_implementationOnly import TSCclibc
1212

13-
/// A Swift version number.
14-
///
15-
/// Note that these are *NOT* semantically versioned numbers.
13+
// FIXME: deprecate 2/2021, remove once clients transitioned
14+
@available(*, deprecated, message: "moved to SwiftPM")
1615
public struct SwiftVersion {
1716
/// The version number.
1817
public var version: (major: Int, minor: Int, patch: Int)
@@ -69,7 +68,8 @@ private func getBuildIdentifier() -> String? {
6968
return buildIdentifier.isEmpty ? nil : buildIdentifier
7069
}
7170

72-
/// Version support for the package manager.
71+
// FIXME: deprecate 2/2021, remove once clients transitioned
72+
@available(*, deprecated, message: "moved to SwiftPM")
7373
public struct Versioning {
7474

7575
/// The current version of the package manager.

0 commit comments

Comments
 (0)