@alcalzone/release-script-plugin-iobroker
Advanced tools
Comparing version 3.0.0 to 3.2.0
@@ -13,2 +13,12 @@ "use strict"; | ||
const translate_1 = require("./translate"); | ||
function getDesiredIoPackVersion(context) { | ||
const version = context.getData("version"); | ||
if (context.argv.ioPackageNoPrerelease) { | ||
const s = semver_1.default.parse(version); | ||
return `${s.major}.${s.minor}.${s.patch}`; | ||
} | ||
else { | ||
return version; | ||
} | ||
} | ||
class IoBrokerPlugin { | ||
@@ -48,2 +58,7 @@ constructor() { | ||
}, | ||
ioPackageNoPrerelease: { | ||
description: "Remove prerelease identifiers from the version in io-package.json", | ||
type: "boolean", | ||
default: false, | ||
}, | ||
}); | ||
@@ -72,3 +87,4 @@ } | ||
const packVersion = context.getData("version"); | ||
if (ioPackVersion !== packVersion) { | ||
const desiredVersion = getDesiredIoPackVersion(context); | ||
if (ioPackVersion !== desiredVersion) { | ||
context.cli.error(`Version mismatch between io-package.json (${ioPackVersion}) and package.json (${packVersion})!`); | ||
@@ -75,0 +91,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "3.0.0", | ||
"version": "3.2.0", | ||
"description": "Plugin for Al Calzone's release script: ioBroker", | ||
@@ -64,3 +64,3 @@ "keywords": [], | ||
"readmeFilename": "README.md", | ||
"gitHead": "3028c9870c84878fb6ce259132156bc1bdcbc147" | ||
"gitHead": "4d89c86be9cda65a559cb31e93789be4392d6c45" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25053
297