Skip to content

add help option on archiver plugin #368

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 1 commit into from
Sep 30, 2024

Conversation

sebsto
Copy link
Contributor

@sebsto sebsto commented Sep 26, 2024

add a --help option to the archiver plugin

Motivation:

The only way to know what available options are was to look at the code

Modifications:

Add a swift package archive --help command line option to print a descriptive help text

Result:

$ swift package archive --help                                 

OVERVIEW: A SwiftPM plugin to build and package your lambda function.

REQUIREMENTS: To use this plugin, you must have docker installed and started.

USAGE: swift package --disable-sandbox archive [--help] [--verbose]
                                           [--output-directory <path>]
                                           [--products <list of products>]
                                           [--configuration debug | release]
                                           [--swift-version <version>]
                                           [--base-docker-image <docker_image_name>]
                                           [--disable-docker-image-update]
                                          

OPTIONS:
--verbose                     Produce verbose output for debugging.
--output-directory <path>     The path of the binary package.
                              (default is `.build/plugins/AWSLambdaPackager/outputs/...`)
--products <list>             The list of executable targets to build.
                              (default is taken from Package.swift)
--configuration <name>        The build configuration (debug or release)
                              (default is release)
--swift-version               The swift version to use for building. 
                              (default is latest)
                              This parameter cannot be used when --base-docker-image  is specified.
--base-docker-image <name>    The name of the base docker image to use for the build.
                              (default : swift-<version>:amazonlinux2)
                              This parameter cannot be used when --swift-version is specified.
--disable-docker-image-update Do not attempt to update the docker image
--help                        Show help information.

@sebsto sebsto requested a review from fabianfett September 26, 2024 06:14
@sebsto sebsto self-assigned this Sep 26, 2024
@sebsto
Copy link
Contributor Author

sebsto commented Sep 26, 2024

The Swift Format error is not on the new code from this PR, it is on LambdaRuntime.swift
To be fixed in a separate PR

diff --git a/Sources/AWSLambdaRuntimeCore/LambdaRuntime.swift b/Sources/AWSLambdaRuntimeCore/LambdaRuntime.swift
index f36c7ee..908e2ab 100644
--- a/Sources/AWSLambdaRuntimeCore/LambdaRuntime.swift
+++ b/Sources/AWSLambdaRuntimeCore/LambdaRuntime.swift
@@ -14,15 +14,15 @@


REQUIREMENTS: To use this plugin, you must have docker installed and started.

USAGE: swift package --disable-sandbox archive [--help] [--verbose]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to get rid of --disable-sandbox in #379.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, but this is another subject. I'll have separate PRs to address these two changes.

Can we first merge this one ?

@sebsto sebsto merged commit 6227444 into swift-server:main Sep 30, 2024
10 of 13 checks passed
@sebsto sebsto deleted the sebsto/plugin-archive-help branch September 30, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants