Skip to content

Commit 6dfc20a

Browse files
Use local dependencies in Swift CI
1 parent 4049a4e commit 6dfc20a

File tree

2 files changed

+15
-74
lines changed

2 files changed

+15
-74
lines changed

Package.resolved

Lines changed: 0 additions & 68 deletions
This file was deleted.

Package.swift

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// swift-tools-version:5.8
22

33
import PackageDescription
4+
import class Foundation.ProcessInfo
45

56
let package = Package(
67
name: "WasmKit",
@@ -25,12 +26,6 @@ let package = Package(
2526
.plugin(name: "WITOverlayPlugin", targets: ["WITOverlayPlugin"]),
2627
.plugin(name: "WITExtractorPlugin", targets: ["WITExtractorPlugin"]),
2728
],
28-
dependencies: [
29-
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.2"),
30-
.package(url: "https://github.com/apple/swift-system", .upToNextMinor(from: "1.1.1")),
31-
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
32-
.package(url: "https://github.com/apple/swift-format.git", from: "508.0.1"),
33-
],
3429
targets: [
3530
.executableTarget(
3631
name: "CLI",
@@ -114,3 +109,17 @@ let package = Package(
114109
],
115110
swiftLanguageVersions: [.v5]
116111
)
112+
113+
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
114+
package.dependencies += [
115+
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.2"),
116+
.package(url: "https://github.com/apple/swift-system", .upToNextMinor(from: "1.1.1")),
117+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
118+
.package(url: "https://github.com/apple/swift-format.git", from: "508.0.1"),
119+
]
120+
} else {
121+
package.dependencies += [
122+
.package(path: "../swift-argument-parser"),
123+
.package(path: "../swift-system"),
124+
]
125+
}

0 commit comments

Comments
 (0)