Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Update to Swift 5.1.5 #39

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ deploy:
provider: releases
api_key:
secure: Ddgpz/LsTWeTTr8Xm0br+Vs3Is58V2bOHthwLOt5a1TbyhWAgU+tyc6lwvd51mhQxeNNVPSOWLKC4QgJEp2KI2ZCaw0K+Czb8lqMzWF5eJggDmJ0+wOZIHVEWMO7smLTwDc1jWtdnQA3qkPtXgSw0ERcJ9z4/haz1Q8v7Jj5qfoBJiNxnYYvw/79ElqROIjtQ0asX/i6xhZSlBFO1dXo5QPzX7XeNREQmh2dCkjfoeYSFSCah4Tnn5akxX36Pef1DJvWdFvc623pWAUoCpeswIMW/htby5tJQ6+C9PK+2yzqomKfU9gTK9iv7Nt3X1LN3KsXpk6VHgtljiUkEsecXjYB5WVBT00mY/4bnTPyY6RjI/V6C0aGnTE+0Pj78kDofJKj5uNevFi4vlBI2g4s4G0mRASFRp+sk3ASmzl62Lohkl1LfNiPYKRKRA2jT81s79zBnYv/MQ7t3fY+yd7iP+NrJfDFR/XG0vxBOQrNRpq6LR0M7DeHgTD/d9an2WEqJlX9pp+Ji/ywwepW7b/NLv42xeN99SnHbDmJJ/eZ4P1IC37JCOT5CjJ9wIyP8c+Q89JT30nlvON9xPM8MOx/MrVAGCeqC6FW1Zjc6oakTRZdngMqN1acH5OosLX83cOjjXo8ivRt5Sm2tfX3ZuOgL98kdaYsIBPIYbYhZDODdvM=
file: ".build/layer/swift-lambda-runtime-5-1-4.zip"
file: ".build/layer/swift-lambda-runtime-5-1-5.zip"
skip_cleanup: true
on:
tags: true
2 changes: 1 addition & 1 deletion Examples/HTTPSRequest/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nio-swift:5.1.4
FROM nio-swift:5.1.5

# Or your actual UID, GID on Linux if not the default 1000
ARG USERNAME=vscode
Expand Down
2 changes: 1 addition & 1 deletion Examples/HTTPSRequest/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HTTPSRequest

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.4](https://img.shields.io/badge/Swift-5.1.4-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.5](https://img.shields.io/badge/Swift-5.1.5-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework and the plugin [LambdaSwiftSprinterNioPlugin](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin) to build a lambda capable to perform an HTTPS request.

Expand Down
2 changes: 1 addition & 1 deletion Examples/HelloWorld/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nio-swift:5.1.4
FROM nio-swift:5.1.5

# Or your actual UID, GID on Linux if not the default 1000
ARG USERNAME=vscode
Expand Down
2 changes: 1 addition & 1 deletion Examples/HelloWorld/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HelloWorld

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.4](https://img.shields.io/badge/Swift-5.1.4-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.5](https://img.shields.io/badge/Swift-5.1.5-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework to build a simple lambda.

Expand Down
2 changes: 1 addition & 1 deletion Examples/PostgreSQLDemo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PostgreSQLDemo

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.4](https://img.shields.io/badge/Swift-5.1.4-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.5](https://img.shields.io/badge/Swift-5.1.5-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework and the plugin [LambdaSwiftSprinterNioPlugin](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin) to build a lambda capable to perform an Postgres query using
[PostgresNIO](https://github.com/vapor/postgres-nio.git).
Expand Down
88 changes: 88 additions & 0 deletions Examples/RedisDemo/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"object": {
"pins": [
{
"package": "async-http-client",
"repositoryURL": "https://github.com/swift-server/async-http-client.git",
"state": {
"branch": null,
"revision": "e2636a4c24e646d3e480fc666da0c090818beb09",
"version": "1.1.0"
}
},
{
"package": "LambdaSwiftSprinter",
"repositoryURL": "https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core",
"state": {
"branch": null,
"revision": "6941e41194bde0e57fb0deb23be620f2b8dd626d",
"version": "1.0.0"
}
},
{
"package": "LambdaSwiftSprinterNioPlugin",
"repositoryURL": "https://github.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin",
"state": {
"branch": null,
"revision": "35d3ab84bf83fc881844b5f7483cb2a1d942a23f",
"version": "1.0.1"
}
},
{
"package": "swift-log",
"repositoryURL": "https://github.com/apple/swift-log.git",
"state": {
"branch": null,
"revision": "74d7b91ceebc85daf387ebb206003f78813f71aa",
"version": "1.2.0"
}
},
{
"package": "swift-metrics",
"repositoryURL": "https://github.com/apple/swift-metrics.git",
"state": {
"branch": null,
"revision": "708b960b4605abb20bc55d65abf6bad607252200",
"version": "2.0.0"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "a27a07719ca785bcaca019a5b9fe1814b981b4a2",
"version": "2.15.0"
}
},
{
"package": "swift-nio-extras",
"repositoryURL": "https://github.com/apple/swift-nio-extras.git",
"state": {
"branch": null,
"revision": "b4dbfacff47fb8d0f9e0a422d8d37935a9f10570",
"version": "1.4.0"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "af46d9b58fafbb76f9b01177568d435a1b024f99",
"version": "2.6.2"
}
},
{
"package": "RediStack",
"repositoryURL": "https://gitlab.com/mordil/swift-redi-stack.git",
"state": {
"branch": null,
"revision": "b08ad5461af53276020a21c7fa66fa1237eea723",
"version": "1.0.0-alpha.8"
}
}
]
},
"version": 1
}
2 changes: 1 addition & 1 deletion Examples/RedisDemo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RedisDemo

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.4](https://img.shields.io/badge/Swift-5.1.4-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.5](https://img.shields.io/badge/Swift-5.1.5-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework and the plugin [LambdaSwiftSprinterNioPlugin](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin) to build a lambda capable to perform an Redis request using
[RediStack](https://gitlab.com/mordil/swift-redi-stack.git).
Expand Down
9 changes: 5 additions & 4 deletions Examples/RedisDemo/Sources/RedisDemo/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ let connection = try? RedisConnection.connect(

let syncCodableNIOLambda: SyncCodableNIOLambda<Event, Response> = { (event, context) throws -> EventLoopFuture<Response> in

guard let connection = connection else {
guard let connection = connection,
let key = RedisKey(rawValue: event.key) else {
throw LambdaError.redisConnectionFailed
}

let future = connection.set(event.key, to: event.value)
.flatMap {
return connection.get(event.key)
let future = connection.set(key, to: event.value)
.flatMap { _ in
return connection.get(key)
}
.map { content -> Response in
return Response(value: content ?? "")
Expand Down
2 changes: 1 addition & 1 deletion Examples/S3Test/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nio-swift:5.1.4
FROM nio-swift:5.1.5

# Or your actual UID, GID on Linux if not the default 1000
ARG USERNAME=vscode
Expand Down
2 changes: 1 addition & 1 deletion Examples/S3Test/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# S3Test

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.4](https://img.shields.io/badge/Swift-5.1.4-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.5](https://img.shields.io/badge/Swift-5.1.5-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework with the third-party library [https://github.com/swift-aws/aws-sdk-swift.git](https://github.com/swift-aws/aws-sdk-swift.git) to build a lambda capable to perform an HTTPS request to an S3 Bucket.

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# Use this tag to build a customized local image

SWIFT_VERSION?=5.1.4
LAYER_VERSION?=5-1-4
SWIFT_VERSION?=5.1.5
LAYER_VERSION?=5-1-5
# SWIFT_VERSION=5.0.3
# LAYER_VERSION=5-0-3
DOCKER_TAG=nio-swift:$(SWIFT_VERSION)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# aws-lambda-swift-sprinter

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.4](https://img.shields.io/badge/Swift-5.1.4-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0-green) ![](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter.svg?branch=master) ![](https://img.shields.io/badge/@AWS-Open-orange.svg)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.5](https://img.shields.io/badge/Swift-5.1.5-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0-green) ![](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter.svg?branch=master) ![](https://img.shields.io/badge/@AWS-Open-orange.svg)

![](./images/aws-lambda-swift-sprinter.png)

Expand Down Expand Up @@ -175,8 +175,8 @@ make invoke_lambda \
| AWS_PROFILE | An AWS AIM profile you create to authenticate to your account. | default |
| IAM_ROLE_NAME | The execution role created that will be assumed by the Lambda. | lambda_sprinter_basic_execution |
| AWS_BUCKET | The AWS S3 bucket where the layer and lambdas zip files get uploaded. | aws-lambda-swift-sprinter |
| SWIFT_VERSION | Version of Swift used / Matches Dockerfile location too from `docker/` folder. | 5.1.4 |
| LAYER_VERSION | Version of the Swift layer that will be created and uploaded for the Lambda to run on. | 5-1-4 |
| SWIFT_VERSION | Version of Swift used / Matches Dockerfile location too from `docker/` folder. | 5.1.5 |
| LAYER_VERSION | Version of the Swift layer that will be created and uploaded for the Lambda to run on. | 5-1-5 |
| SWIFT_EXECUTABLE | Name of the binary file. | HelloWorld |
| SWIFT_PROJECT_PATH | Path to your Swift project. | Examples/HelloWorld |
| LAMBDA_FUNCTION_NAME | Display name of your Lambda in AWS. | HelloWorld |
Expand Down Expand Up @@ -459,8 +459,8 @@ Stop the docker-compose test environment

### Configure:
- Go to `AWS Lambda -> Layers` in AWS Console and create a new layer from scratch
- Enter layer name "swift-lambda-runtime-5-1-4"
- Upload the zip file `build/swift-lambda-runtime-5-1-4.zip`
- Enter layer name "swift-lambda-runtime-5-1-5"
- Upload the zip file `build/swift-lambda-runtime-5-1-5.zip`
- Leave "Compatible runtimes" empty.
- Click "Create"
- Copy the `arn` from the created layer, it's required to set up the lambda.
Expand Down
2 changes: 1 addition & 1 deletion docker/5.1.4/Dockerfile → docker/5.1.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swift:5.1.4 as builder
FROM swift:5.1.5 as builder

RUN apt-get -qq update && apt-get -q -y install \
libssl-dev libicu-dev