Skip to content

Commit f5228ef

Browse files
committed
Use local git package
1 parent 3e3bd6a commit f5228ef

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

CodeGeneration/Package.swift

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

33
import PackageDescription
4+
import Foundation
45

56
let package = Package(
67
name: "CodeGeneration",
@@ -11,8 +12,7 @@ let package = Package(
1112
.executable(name: "generate-swiftsyntax", targets: ["generate-swiftsyntax"])
1213
],
1314
dependencies: [
14-
.package(url: "https://github.com/apple/swift-syntax.git", revision: "94120e0cf9bf541e54fbc8512934daea23a9ad0c"),
15-
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.2")),
15+
.package(path: ".."),
1616
],
1717
targets: [
1818
.executableTarget(
@@ -41,3 +41,14 @@ let package = Package(
4141
),
4242
]
4343
)
44+
45+
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
46+
// Building standalone.
47+
package.dependencies += [
48+
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.2")),
49+
]
50+
} else {
51+
package.dependencies += [
52+
.package(path: "../../swift-argument-parser"),
53+
]
54+
}

0 commit comments

Comments
 (0)