Add support for SWIFTCI_USE_LOCAL_DEPS convention (#311)

To use this package in utils/build-script pipeline
This commit is contained in:
Yuta Saito authored and GitHub committed 2024-04-10 14:41:45 -07:00
1 parent 46b4464735
commit 6ae9a051f7
1 file changed
+11 -4
+11 -4
View File
@@ -13,10 +13,6 @@ let package = Package(
products: [
.library(name: "AsyncAlgorithms", targets: ["AsyncAlgorithms"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: [
.target(
name: "AsyncAlgorithms",
@@ -52,3 +48,14 @@ let package = Package(
),
]
)
if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies += [
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
]
} else {
package.dependencies += [
.package(path: "../swift-collections"),
]
}