Skip to content

Commit

Permalink
Add support for SWIFTCI_USE_LOCAL_DEPS convention (apple#311)
Browse files Browse the repository at this point in the history
To use this package in utils/build-script pipeline
  • Loading branch information
kateinoigakukun authored Apr 10, 2024
1 parent 46b4464 commit 6ae9a05
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"),
]
}

0 comments on commit 6ae9a05

Please sign in to comment.