You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: readme.md
+25
Original file line number
Diff line number
Diff line change
@@ -185,8 +185,33 @@ To build and package your Lambda, run the following command:
185
185
swift package archive
186
186
```
187
187
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
+
188
211
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.
189
212
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.
0 commit comments