Skip to content

Commit

Permalink
Removed external dependency as it wasn't building on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Strijdom committed Sep 27, 2024
1 parent 5aa8789 commit 62e1fec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
9 changes: 0 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@
"version" : "1.0.1"
}
},
{
"identity" : "semver.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/glwithu06/Semver.swift.git",
"state" : {
"revision" : "53073d00185c49d5bdedc13e3697f5eb760fc2ad",
"version" : "1.2.0"
}
},
{
"identity" : "shellout",
"kind" : "remoteSourceControl",
Expand Down
6 changes: 2 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ let package = Package(
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.1.2"),
.package(url: "https://github.com/SwiftGen/StencilSwiftKit", from: "2.8.0"),
.package(url: "https://github.com/JohnSundell/ShellOut", from: "2.3.0"),
.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.6"),
.package(url: "https://github.com/glwithu06/Semver.swift.git", from: "1.2.0")
.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.6")
],
targets: [
.executableTarget(
Expand All @@ -23,8 +22,7 @@ let package = Package(
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "ShellOut", package: "ShellOut"),
.product(name: "StencilSwiftKit", package: "StencilSwiftKit"),
.product(name: "Yams", package: "Yams"),
.product(name: "Semver", package: "Semver.swift")
.product(name: "Yams", package: "Yams")
],
path: "Sources"),
.testTarget(
Expand Down
5 changes: 2 additions & 3 deletions Sources/Core/Spec+Context.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Spec+Context.swift

import Foundation
import Semver

extension Spec.Product {
func makeContext() -> [String: Any] {
Expand Down Expand Up @@ -36,8 +35,8 @@ extension Spec.RemoteDependency {
extension Spec {
var swiftToolsVersionMajor: Int? {
guard let swiftToolsVersionString = swiftToolsVersion else { return nil }
if let swiftToolsVersion = try? Semver(string: swiftToolsVersionString) {
return Int(swiftToolsVersion.major)
if let majorString = swiftToolsVersionString.components(separatedBy: ".").first {
return Int(majorString)
}
return nil
}
Expand Down

0 comments on commit 62e1fec

Please sign in to comment.