Skip to content
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

Replaced swiftLanguageVersions with swiftLanguageModes for Swift 6 onwards #8

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All we really need 👍

return Int(majorString)
}
return nil
}
Expand Down