Skip to content

Commit db795ff

Browse files
authored
Bento: checksum name support (#3)
* Bento: checksum name support * rename prop and add readme
1 parent 68592eb commit db795ff

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

Diff for: README.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ you can use this shorthand,
127127
```json
128128
{
129129
"blobpack": {
130-
"artifacts": [
131-
"boring"
132-
]
130+
"artifacts": ["boring"]
133131
}
134132
}
135133
```
@@ -143,9 +141,23 @@ you can use the `include` property,
143141
"include": {
144142
"resources": ["logger"]
145143
},
146-
"artifacts": [
147-
"boring"
148-
]
144+
"artifacts": ["boring"]
145+
}
146+
}
147+
```
148+
149+
#### Bento support
150+
151+
If you need Serverless Bento, you can change `src` and `checksumPrefix` properties:
152+
153+
```json
154+
{
155+
"blobpack": {
156+
"name": "benthos-lambda",
157+
"version": "4.10.0",
158+
"platform": "linux_amd64",
159+
"checksumPrefix": "bento",
160+
"src": "https://github.com/warpstreamlabs/bento/releases/download"
149161
}
150162
}
151163
```

Diff for: lib/config.js

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ export const loadConfig = async (configPath) => {
1010
)
1111
}
1212

13+
if (typeof config.checksumPrefix === 'undefined') {
14+
config.checksumPrefix = 'benthos'
15+
}
16+
1317
return config
1418
}
1519

Diff for: lib/install.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ const get = async (benthos) => {
3838

3939
const [data, checksums] = await Promise.all([
4040
download(`${root}/${name}`),
41-
download(`${root}/benthos_${benthos.version}_checksums.txt`)
41+
download(
42+
`${root}/${benthos.checksumPrefix}_${benthos.version}_checksums.txt`
43+
)
4244
])
4345

4446
return { name, data, checksums }

0 commit comments

Comments
 (0)