Skip to content

Commit a5d9dd3

Browse files
authored
fix: swift (#2955)
1 parent b14f3bc commit a5d9dd3

File tree

9 files changed

+16
-93
lines changed

9 files changed

+16
-93
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ s3-uploader/runtimes/llrt_on_provided_al2023/llrt-lambda-x64.zip
2424
s3-uploader/runtimes/llrt_on_provided_al2023/llrt-lambda-arm64.zip
2525
s3-uploader/runtimes/*/code*.zip
2626
s3-uploader/runtimes/swift*/.build
27+
s3-uploader/runtimes/swift*/Package.resolved
2728

2829
result-builder/node_modules
2930

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"memorySizes": [128, 256, 512, 1024],
33
"runtimes": [
44
{
5-
"displayName": "apple swift 6.1 (prov.al2)",
5+
"displayName": "apple swift 6.2 (prov.al2)",
66
"runtime": "provided.al2",
77
"handler": "SimpleLambdaHandler",
8-
"path": "swift61_on_provided_al2",
8+
"path": "swift62_on_provided_al2",
99
"architectures": ["x86_64", "arm64"],
1010
"image": {
1111
"baseImage": "public.ecr.aws/lambda/provided:al2"

s3-uploader/runtimes/swift61_on_provided_al2/Package.resolved

Lines changed: 0 additions & 78 deletions
This file was deleted.

s3-uploader/runtimes/swift61_on_provided_al2/Sources/MaxdayLambda/Lambda.swift

Lines changed: 0 additions & 8 deletions
This file was deleted.

s3-uploader/runtimes/swift61_on_provided_al2/.dockerignore renamed to s3-uploader/runtimes/swift62_on_provided_al2/.dockerignore

File renamed without changes.

s3-uploader/runtimes/swift61_on_provided_al2/Dockerfile renamed to s3-uploader/runtimes/swift62_on_provided_al2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/docker/library/swift:6.1-amazonlinux2 AS builder
1+
FROM public.ecr.aws/docker/library/swift:6.2-amazonlinux2 AS builder
22
RUN mkdir -p /tmp/app/src
33
COPY . /tmp/app/src/
44
WORKDIR /tmp/app/src/

s3-uploader/runtimes/swift61_on_provided_al2/Package.swift renamed to s3-uploader/runtimes/swift62_on_provided_al2/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.1
1+
// swift-tools-version: 6.2
22

33
import PackageDescription
44

@@ -9,7 +9,7 @@ let package = Package(
99
.executable(name: "MaxdayLambda", targets: ["MaxdayLambda"]),
1010
],
1111
dependencies: [
12-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.3"),
12+
.package(url: "https://github.com/awslabs/swift-aws-lambda-runtime", from: "2.3.0"),
1313
],
1414
targets: [
1515
.executableTarget(name: "MaxdayLambda", dependencies: [
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import AWSLambdaRuntime
2+
3+
let runtime = LambdaRuntime {
4+
(event: [String: String], context: LambdaContext) in
5+
"OK"
6+
}
7+
8+
try await runtime.run()

s3-uploader/runtimes/swift61_on_provided_al2/build.sh renamed to s3-uploader/runtimes/swift62_on_provided_al2/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fi
1313

1414
rm ${DIR_NAME}/code_${2}.zip 2> /dev/null
1515

16-
docker build ${DIR_NAME} --platform ${ARCH} -t maxday/swift61_on_provided_al2_${2}
17-
dockerId=$(docker create maxday/swift61_on_provided_al2_${2})
16+
docker build ${DIR_NAME} --platform ${ARCH} -t maxday/swift62_on_provided_al2_${2}
17+
dockerId=$(docker create maxday/swift62_on_provided_al2_${2})
1818

1919
docker cp $dockerId:/code.zip ${DIR_NAME}/code_${2}.zip

0 commit comments

Comments
 (0)