Skip to content

Commit

Permalink
Merge pull request #1897 from kateinoigakukun/katei/support-swiftci
Browse files Browse the repository at this point in the history
Support SWIFTCI_USE_LOCAL_DEPS in SourceKitLSPDevUtils
  • Loading branch information
ahoppen authored Jan 15, 2025
2 parents 274726f + 20b967c commit f60752b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions SourceKitLSPDevUtils/Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// swift-tools-version: 6.0

import Foundation
import PackageDescription

let package = Package(
Expand All @@ -8,10 +9,6 @@ let package = Package(
products: [
.executable(name: "sourcekit-lsp-dev-utils", targets: ["SourceKitLSPDevUtils"])
],
dependencies: [
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
],
targets: [
.executableTarget(
name: "SourceKitLSPDevUtils",
Expand All @@ -29,3 +26,14 @@ let package = Package(
),
]
)

let dependencies: [(url: String, path: String, fromVersion: Version)] = [
("https://github.com/swiftlang/swift-syntax.git", "../../swift-syntax", "600.0.1"),
("https://github.com/apple/swift-argument-parser.git", "../../swift-argument-parser", "1.5.0"),
]

if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies += dependencies.map { .package(url: $0.url, from: $0.fromVersion) }
} else {
package.dependencies += dependencies.map { .package(url: $0.path, from: $0.fromVersion) }
}

0 comments on commit f60752b

Please sign in to comment.