Skip to content

Commit 560087c

Browse files
committed
fix to align to PR 292 swift-server#292
1 parent 40f02d1 commit 560087c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Examples/SAM/Package.swift

+10-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
//
1515
// ===----------------------------------------------------------------------===//
1616

17+
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
1718
import PackageDescription
1819

1920
let package = Package(
@@ -26,10 +27,7 @@ let package = Package(
2627
.executable(name: "SQSLambda", targets: ["SQSLambda"]),
2728
],
2829
dependencies: [
29-
// this is the dependency on the swift-aws-lambda-runtime library
30-
// in real-world projects this would say
31-
// .package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", branch: "main"),
32-
.package(name: "swift-aws-lambda-runtime", path: "../.."),
30+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
3331
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", branch: "main")
3432
],
3533
targets: [
@@ -63,3 +61,11 @@ let package = Package(
6361
)
6462
]
6563
)
64+
65+
// for CI to test the local version of the library
66+
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
67+
package.dependencies = [
68+
.package(name: "swift-aws-lambda-runtime", path: "../.."),
69+
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", branch: "main"),
70+
]
71+
}

0 commit comments

Comments
 (0)