Skip to content

Commit

Permalink
rename prop and add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
spinx committed Sep 7, 2024
1 parent cb20a55 commit 9c94546
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ you can use this shorthand,
```json
{
"blobpack": {
"artifacts": [
"boring"
]
"artifacts": ["boring"]
}
}
```
Expand All @@ -143,9 +141,23 @@ you can use the `include` property,
"include": {
"resources": ["logger"]
},
"artifacts": [
"boring"
]
"artifacts": ["boring"]
}
}
```

#### Bento support

If you need Serverless Bento, you can change `src` and `checksumPrefix` properties:

```json
{
"blobpack": {
"name": "benthos-lambda",
"version": "4.10.0",
"platform": "linux_amd64",
"checksumPrefix": "bento",
"src": "https://github.com/warpstreamlabs/bento/releases/download"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const loadConfig = async (configPath) => {
)
}

if (typeof config.checksum === 'undefined') {
config.checksum = 'benthos'
if (typeof config.checksumPrefix === 'undefined') {
config.checksumPrefix = 'benthos'
}

return config
Expand Down
4 changes: 3 additions & 1 deletion lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const get = async (benthos) => {

const [data, checksums] = await Promise.all([
download(`${root}/${name}`),
download(`${root}/${benthos.checksum}_${benthos.version}_checksums.txt`)
download(
`${root}/${benthos.checksumPrefix}_${benthos.version}_checksums.txt`
)
])

return { name, data, checksums }
Expand Down

0 comments on commit 9c94546

Please sign in to comment.