-
Notifications
You must be signed in to change notification settings - Fork 113
packaging plugin #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
packaging plugin #254
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ebd585b
packaging plugin
tomerd 95134c0
check for amazonlinux, zip correctly, drop 5.2 and 5.3
tomerd 5c035d2
parse arguments
tomerd 4b23bb6
Update Plugins/AWSLambdaPackager/Plugin.swift
tomerd df4ab5d
fixup
tomerd ff17559
swift version
tomerd 6a758e7
cleanup
tomerd 1a249d8
cleanup
tomerd ff7d30a
error handling
tomerd 6b63d0e
Fix Package.swift symlink issues (#1)
fabianfett f43f914
cleanup
tomerd 0ddf8fb
info about products, allways pull latest docker iamge
tomerd 0eed404
debug
tomerd b2842ba
error handling
tomerd 0457a37
fixup
tomerd 820eb62
Update [email protected]
tomerd 936eb8f
better way to pull
tomerd 03ff066
nicer output
tomerd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// swift-tools-version:5.6 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "swift-aws-lambda-runtime", | ||
products: [ | ||
// this library exports `AWSLambdaRuntimeCore` and adds Foundation convenience methods | ||
.library(name: "AWSLambdaRuntime", targets: ["AWSLambdaRuntime"]), | ||
// this has all the main functionality for lambda and it does not link Foundation | ||
.library(name: "AWSLambdaRuntimeCore", targets: ["AWSLambdaRuntimeCore"]), | ||
// plugin to package the lambda, creating an archive that can be uploaded to AWS | ||
.plugin(name: "AWSLambdaPackager", targets: ["AWSLambdaPackager"]), | ||
// for testing only | ||
.library(name: "AWSLambdaTesting", targets: ["AWSLambdaTesting"]), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.33.0")), | ||
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.4.2")), | ||
.package(url: "https://github.com/swift-server/swift-backtrace.git", .upToNextMajor(from: "1.2.3")), | ||
], | ||
targets: [ | ||
.target(name: "AWSLambdaRuntime", dependencies: [ | ||
.byName(name: "AWSLambdaRuntimeCore"), | ||
.product(name: "NIOCore", package: "swift-nio"), | ||
.product(name: "NIOFoundationCompat", package: "swift-nio"), | ||
]), | ||
.target(name: "AWSLambdaRuntimeCore", dependencies: [ | ||
.product(name: "Logging", package: "swift-log"), | ||
.product(name: "Backtrace", package: "swift-backtrace"), | ||
.product(name: "NIOHTTP1", package: "swift-nio"), | ||
.product(name: "NIOCore", package: "swift-nio"), | ||
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"), | ||
.product(name: "NIOPosix", package: "swift-nio"), | ||
]), | ||
.plugin( | ||
name: "AWSLambdaPackager", | ||
capability: .command( | ||
intent: .custom( | ||
verb: "archive", | ||
description: "Archive the Lambda binary and prepare it for uploading to AWS. Requires docker on macOS." | ||
) | ||
) | ||
), | ||
.testTarget(name: "AWSLambdaRuntimeCoreTests", dependencies: [ | ||
.byName(name: "AWSLambdaRuntimeCore"), | ||
.product(name: "NIOTestUtils", package: "swift-nio"), | ||
.product(name: "NIOFoundationCompat", package: "swift-nio"), | ||
]), | ||
.testTarget(name: "AWSLambdaRuntimeTests", dependencies: [ | ||
.byName(name: "AWSLambdaRuntimeCore"), | ||
.byName(name: "AWSLambdaRuntime"), | ||
]), | ||
// testing helper | ||
.target(name: "AWSLambdaTesting", dependencies: [ | ||
.byName(name: "AWSLambdaRuntime"), | ||
.product(name: "NIO", package: "swift-nio"), | ||
]), | ||
.testTarget(name: "AWSLambdaTestingTests", dependencies: ["AWSLambdaTesting"]), | ||
// for perf testing | ||
.executableTarget(name: "MockServer", dependencies: [ | ||
.product(name: "NIOHTTP1", package: "swift-nio"), | ||
.product(name: "NIO", package: "swift-nio"), | ||
]), | ||
] | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.