File tree 4 files changed +27
-11
lines changed
4 files changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ let package = Package(
20
20
dependencies: [
21
21
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
22
22
. package ( url: " https://github.com/swift-server/swift-aws-lambda-runtime.git " , branch: " main " ) ,
23
- . package ( url: " https://github.com/swift-server/swift-aws-lambda-events.git " , branch: " main " )
23
+ . package ( url: " https://github.com/swift-server/swift-aws-lambda-events.git " , branch: " main " ) ,
24
24
] ,
25
25
targets: [
26
26
. executableTarget(
@@ -41,15 +41,19 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
41
41
{
42
42
// when we use the local runtime as deps, let's remove the dependency added above
43
43
let indexToRemove = package . dependencies. firstIndex { dependency in
44
- if case . sourceControl( name: _, location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " , requirement: _) = dependency. kind {
44
+ if case . sourceControl(
45
+ name: _,
46
+ location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " ,
47
+ requirement: _
48
+ ) = dependency. kind {
45
49
return true
46
50
}
47
51
return false
48
52
}
49
53
if let indexToRemove {
50
54
package . dependencies. remove ( at: indexToRemove)
51
55
}
52
-
56
+
53
57
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
54
58
print ( " [INFO] Compiling against swift-aws-lambda-runtime located at \( localDepsPath) " )
55
59
package . dependencies += [
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ let package = Package(
19
19
] ,
20
20
dependencies: [
21
21
// during CI, the dependency on local version of swift-aws-lambda-runtime is added dynamically below
22
- . package ( url: " https://github.com/swift-server/swift-aws-lambda-runtime.git " , branch: " main " ) ,
22
+ . package ( url: " https://github.com/swift-server/swift-aws-lambda-runtime.git " , branch: " main " )
23
23
] ,
24
24
targets: [
25
25
. executableTarget(
@@ -39,15 +39,19 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
39
39
{
40
40
// when we use the local runtime as deps, let's remove the dependency added above
41
41
let indexToRemove = package . dependencies. firstIndex { dependency in
42
- if case . sourceControl( name: _, location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " , requirement: _) = dependency. kind {
42
+ if case . sourceControl(
43
+ name: _,
44
+ location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " ,
45
+ requirement: _
46
+ ) = dependency. kind {
43
47
return true
44
48
}
45
49
return false
46
50
}
47
51
if let indexToRemove {
48
52
package . dependencies. remove ( at: indexToRemove)
49
53
}
50
-
54
+
51
55
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
52
56
print ( " [INFO] Compiling against swift-aws-lambda-runtime located at \( localDepsPath) " )
53
57
package . dependencies += [
Original file line number Diff line number Diff line change @@ -42,18 +42,22 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
42
42
{
43
43
// when we use the local runtime as deps, let's remove the dependency added above
44
44
let indexToRemove = package . dependencies. firstIndex { dependency in
45
- if case . sourceControl( name: _, location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " , requirement: _) = dependency. kind {
45
+ if case . sourceControl(
46
+ name: _,
47
+ location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " ,
48
+ requirement: _
49
+ ) = dependency. kind {
46
50
return true
47
51
}
48
52
return false
49
53
}
50
54
if let indexToRemove {
51
55
package . dependencies. remove ( at: indexToRemove)
52
56
}
53
-
57
+
54
58
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
55
59
print ( " [INFO] Compiling against swift-aws-lambda-runtime located at \( localDepsPath) " )
56
60
package . dependencies += [
57
61
. package ( name: " swift-aws-lambda-runtime " , path: localDepsPath)
58
62
]
59
- }
63
+ }
Original file line number Diff line number Diff line change @@ -43,15 +43,19 @@ if let localDepsPath = Context.environment["LAMBDA_USE_LOCAL_DEPS"],
43
43
{
44
44
// when we use the local runtime as deps, let's remove the dependency added above
45
45
let indexToRemove = package . dependencies. firstIndex { dependency in
46
- if case . sourceControl( name: _, location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " , requirement: _) = dependency. kind {
46
+ if case . sourceControl(
47
+ name: _,
48
+ location: " https://github.com/swift-server/swift-aws-lambda-runtime.git " ,
49
+ requirement: _
50
+ ) = dependency. kind {
47
51
return true
48
52
}
49
53
return false
50
54
}
51
55
if let indexToRemove {
52
56
package . dependencies. remove ( at: indexToRemove)
53
57
}
54
-
58
+
55
59
// then we add the dependency on LAMBDA_USE_LOCAL_DEPS' path (typically ../..)
56
60
print ( " [INFO] Compiling against swift-aws-lambda-runtime located at \( localDepsPath) " )
57
61
package . dependencies += [
You can’t perform that action at this time.
0 commit comments