Skip to content

Commit

Permalink
Add support for SWIFTCI_USE_LOCAL_DEPS convention (#2699)
Browse files Browse the repository at this point in the history
To use this package in utils/build-script pipeline
  • Loading branch information
kateinoigakukun committed Apr 10, 2024
1 parent b222c26 commit 8b43f70
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ let package = Package(
.library(name: "_NIOFileSystem", targets: ["_NIOFileSystem", "NIOFileSystem"]),
.library(name: "_NIOFileSystemFoundationCompat", targets: ["_NIOFileSystemFoundationCompat"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.2"),
.package(url: "https://github.com/apple/swift-system.git", from: "1.2.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: [
// MARK: - Targets

Expand Down Expand Up @@ -509,3 +503,18 @@ let package = Package(
)
]
)

if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies += [
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.2"),
.package(url: "https://github.com/apple/swift-system.git", from: "1.2.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
]
} else {
package.dependencies += [
.package(path: "../swift-atomics"),
.package(path: "../swift-collections"),
.package(path: "../swift-system"),
]
}

0 comments on commit 8b43f70

Please sign in to comment.