Skip to content

Commit

Permalink
Prepare release 0.5 (#37)
Browse files Browse the repository at this point in the history
* Prepare release 0.5

Strip symbols from release binaries, so they are smaller.

* Remove pull_request events

They only create duplicated jobs.
  • Loading branch information
calavera committed Mar 28, 2022
1 parent 92424a2 commit 15af83c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
@@ -1,4 +1,4 @@
on: [push, pull_request]
on: [push]

name: Build

Expand Down
5 changes: 4 additions & 1 deletion Cargo.toml
@@ -1,14 +1,17 @@
[package]
name = "cargo-lambda"
description = "Cargo subcommand to work with AWS Lambda"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
license = "MIT"
readme = "README.md"
homepage = "https://github.com/calavera/cargo-lambda"
repository = "https://github.com/calavera/cargo-lambda"
keywords = ["cargo", "subcommand", "aws", "lambda"]

[profile.release]
strip = "symbols"

# Use cargo-edit(https://github.com/killercup/cargo-edit#installation)
# to manage dependencies.
# Running `cargo add DEPENDENCY_NAME` will
Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -92,7 +92,7 @@ cargo lambda start

The function is not compiled until the first time that you try to execute. See the [invoke](#invoke) command to learn how to execute a function. Cargo will run the command `cargo run --bin FUNCTION_NAME` to try to compile the function. `FUNCTION_NAME` can be either the name of the package if the package has only one binary, or the binary name in the `[[bin]]` section if the package includes more than one binary.

### Start - Environment variables
#### Start - Environment variables

If you need to set environment variables for your function to run, you can specify them in the metadata section of your Cargo.toml file.

Expand Down Expand Up @@ -135,23 +135,23 @@ path = "src/bin/add-product.rs"

The invoke subcomand helps you send requests to the control plane emulator. To use this subcommand, you have to provide the name of the Lambda function that you want to invoke, and the payload that you want to send. When the control plane emulator receives the request, it will compile your Lambda function and handle your request.

### Invoke - Ascii data
#### Invoke - Ascii data

The `--data-ascii` flag allows you to send a payload directly from the command line:

```
cargo lambda invoke basic-lambda --data-ascii '{"command": "hi"}'
```

### Invoke - File data
#### Invoke - File data

The `--data-file` flag allows you to read the payload from a file in your file system:

```
cargo lambda invoke basic-lambda --data-file examples/my-payload.json
```

### Invoke - Example data
#### Invoke - Example data

The `--data-example` flag allows you to fetch an example payload from the [aws-lambda-events repository](https://github.com/LegNeato/aws-lambda-events/), and use it as your request payload. For example, if you want to use the [example-apigw-request.json](https://github.com/LegNeato/aws-lambda-events/blob/master/aws_lambda_events/src/generated/fixtures/example-apigw-request.json) payload, you have to pass the name `apigw-request` into this flag:

Expand Down

0 comments on commit 15af83c

Please sign in to comment.