Add Mac compatibility

ft/strip-markdown
KaKi87 2 months ago
parent 5884b0407d
commit 3e21b498b9

@ -192,7 +192,7 @@ createRoute({
{
const
pathSchema = Joi.object({
target: Joi.string().required().valid('linux', 'windows'),
target: Joi.string().required().valid('linux', 'windows', 'darwin'),
currentVersion: Joi.string().required().custom((value, helpers) => semver.valid(value) ? value : helpers.error('any.invalid'))
}),
handler = async (
@ -228,7 +228,8 @@ createRoute({
const
assetNameSuffix = {
'linux': '_amd64.AppImage.tar.gz',
'windows': '.msi.zip'
'windows': '.msi.zip',
'darwin': '.app.tar.gz'
}[target],
getSignatureAsset = release => release['assets'].find(asset => asset.name.endsWith(`${assetNameSuffix}.sig`)),
getTargetAsset = release => release['assets'].find(asset => asset.name.endsWith(assetNameSuffix)),

Loading…
Cancel
Save