diff --git a/README.md b/README.md index 993d91e..81c823c 100644 --- a/README.md +++ b/README.md @@ -127,9 +127,7 @@ you can use this shorthand, ```json { "blobpack": { - "artifacts": [ - "boring" - ] + "artifacts": ["boring"] } } ``` @@ -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" } } ``` diff --git a/lib/config.js b/lib/config.js index a89e8d9..0c9b5a6 100644 --- a/lib/config.js +++ b/lib/config.js @@ -10,6 +10,10 @@ export const loadConfig = async (configPath) => { ) } + if (typeof config.checksumPrefix === 'undefined') { + config.checksumPrefix = 'benthos' + } + return config } diff --git a/lib/install.js b/lib/install.js index 17c9204..e667bb0 100644 --- a/lib/install.js +++ b/lib/install.js @@ -38,7 +38,9 @@ const get = async (benthos) => { const [data, checksums] = await Promise.all([ download(`${root}/${name}`), - download(`${root}/benthos_${benthos.version}_checksums.txt`) + download( + `${root}/${benthos.checksumPrefix}_${benthos.version}_checksums.txt` + ) ]) return { name, data, checksums }