Skip to content

Commit

Permalink
Use local dependencies in Swift CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Feb 2, 2024
1 parent 4049a4e commit 6dfc20a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 74 deletions.
68 changes: 0 additions & 68 deletions Package.resolved

This file was deleted.

21 changes: 15 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// swift-tools-version:5.8

import PackageDescription
import class Foundation.ProcessInfo

let package = Package(
name: "WasmKit",
Expand All @@ -25,12 +26,6 @@ let package = Package(
.plugin(name: "WITOverlayPlugin", targets: ["WITOverlayPlugin"]),
.plugin(name: "WITExtractorPlugin", targets: ["WITExtractorPlugin"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.2"),
.package(url: "https://github.com/apple/swift-system", .upToNextMinor(from: "1.1.1")),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-format.git", from: "508.0.1"),
],
targets: [
.executableTarget(
name: "CLI",
Expand Down Expand Up @@ -114,3 +109,17 @@ let package = Package(
],
swiftLanguageVersions: [.v5]
)

if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies += [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.2"),
.package(url: "https://github.com/apple/swift-system", .upToNextMinor(from: "1.1.1")),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-format.git", from: "508.0.1"),
]
} else {
package.dependencies += [
.package(path: "../swift-argument-parser"),
.package(path: "../swift-system"),
]
}

0 comments on commit 6dfc20a

Please sign in to comment.