Skip to content

Commit f60752b

Browse files
authored
Merge pull request #1897 from kateinoigakukun/katei/support-swiftci
Support SWIFTCI_USE_LOCAL_DEPS in SourceKitLSPDevUtils
2 parents 274726f + 20b967c commit f60752b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

SourceKitLSPDevUtils/Package.swift

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// swift-tools-version: 6.0
22

3+
import Foundation
34
import PackageDescription
45

56
let package = Package(
@@ -8,10 +9,6 @@ let package = Package(
89
products: [
910
.executable(name: "sourcekit-lsp-dev-utils", targets: ["SourceKitLSPDevUtils"])
1011
],
11-
dependencies: [
12-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
13-
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
14-
],
1512
targets: [
1613
.executableTarget(
1714
name: "SourceKitLSPDevUtils",
@@ -29,3 +26,14 @@ let package = Package(
2926
),
3027
]
3128
)
29+
30+
let dependencies: [(url: String, path: String, fromVersion: Version)] = [
31+
("https://github.com/swiftlang/swift-syntax.git", "../../swift-syntax", "600.0.1"),
32+
("https://github.com/apple/swift-argument-parser.git", "../../swift-argument-parser", "1.5.0"),
33+
]
34+
35+
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
36+
package.dependencies += dependencies.map { .package(url: $0.url, from: $0.fromVersion) }
37+
} else {
38+
package.dependencies += dependencies.map { .package(url: $0.path, from: $0.fromVersion) }
39+
}

0 commit comments

Comments
 (0)