Skip to content

Commit b83e41d

Browse files
committed
Allow parts of zip name to be optional
1 parent c0fbfab commit b83e41d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/zip-name.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
export const zipName = (benthos) =>
2-
`${benthos.name}_${benthos.version}_${benthos.platform}.zip`
1+
export const zipName = (benthos) => {
2+
const { name, version, platform } = benthos
3+
return `${[name, version, platform].filter((x) => !!x).join('_')}.zip`
4+
}

0 commit comments

Comments
 (0)