Skip to content

Commit f48e1cf

Browse files
committed
[Utility] Update for review feedback.
1 parent cf9d6ba commit f48e1cf

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Sources/Utility/Git.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ public class Git {
6262
// First, check if we need to restrict the tag set to version-specific tags.
6363
var knownVersions: [Version: String] = [:]
6464
for versionSpecificKey in Versioning.currentVersionSpecificKeys {
65-
for tag in tags {
66-
if tag.hasSuffix(versionSpecificKey) {
67-
let specifier = String(tag.characters.dropLast(versionSpecificKey.characters.count))
68-
if let version = Version(specifier) ?? Version.vprefix(specifier) {
69-
knownVersions[version] = tag
70-
}
65+
for tag in tags where tag.hasSuffix(versionSpecificKey) {
66+
let specifier = String(tag.characters.dropLast(versionSpecificKey.characters.count))
67+
if let version = Version(specifier) ?? Version.vprefix(specifier) {
68+
knownVersions[version] = tag
7169
}
7270
}
7371

Sources/Utility/Versioning.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ public struct SwiftVersion {
2727
/// Build information, as an unstructured string.
2828
public var buildIdentifier: String?
2929

30-
/// The major version number
30+
/// The major component of the version number.
3131
public var major: Int { return version.major }
32+
/// The minor component of the version number.
3233
public var minor: Int { return version.minor }
34+
/// The patch component of the version number.
3335
public var patch: Int { return version.patch }
3436

3537
/// The version as a readable string.

0 commit comments

Comments
 (0)