Skip to content

Commit 5dc0da0

Browse files
authored
Archive plugin documentation (#287)
Improve archive command documentation * Show the options that the new `archive` plugin provides to customize the operation behavior. * Provide an example with the `archive` command taking two parameters
1 parent 81762b0 commit 5dc0da0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

readme.md

+25
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,33 @@ To build and package your Lambda, run the following command:
185185
swift package archive
186186
```
187187

188+
The `archive` command can be customized using the following parameters
189+
190+
* `--output-path` A valid file system path where a folder with the archive operation result will be placed. This folder will contains the following elements:
191+
* A file link named `bootstrap`
192+
* An executable file
193+
* A **Zip** file ready to be upload to AWS
194+
* `--verbose` A number that sets the command output detail level between the following values:
195+
* `0` (Silent)
196+
* `1` (Output)
197+
* `2` (Debug)
198+
* `--swift-version` Swift language version used to define the Amazon Linux 2 Docker image. For example "5.7.3"
199+
* `--base-docker-image` An Amazon Linux 2 docker image name available in your system.
200+
201+
Both `--swift-version` and `--base-docker-image` are mutually exclusive
202+
203+
Here's an example
204+
205+
```zsh
206+
swift package archive --output-path /Users/JohnAppleseed/Desktop --verbose 2
207+
```
208+
209+
This command execution will generate a folder at `/Users/JohnAppleseed/Desktop` with the lambda zipped and ready to upload it and set the command detail output level to `2` (debug)
210+
188211
on macOS, the archiving plugin uses docker to build the Lambda for Amazon Linux 2, and as such requires to communicate with Docker over the localhost network.
189212
At the moment, SwiftPM does not allow plugin communication over network, and as such the invocation requires breaking from the SwiftPM plugin sandbox. This limitation would be removed in the future.
213+
214+
190215

191216
```shell
192217
swift package --disable-sandbox archive

0 commit comments

Comments
 (0)