1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Update generate-publish-script to handle maintenance releases

This commit is contained in:
Nick O'Leary 2021-07-30 10:44:46 +01:00
parent 1750690309
commit 297dd81327
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -4,6 +4,8 @@ const path = require("path");
const fs = require("fs-extra");
const should = require("should");
const LATEST = "2";
function generateScript() {
return new Promise((resolve, reject) => {
const packages = [
@ -18,7 +20,13 @@ function generateScript() {
const rootPackage = require(path.join(__dirname,"..","package.json"));
const version = rootPackage.version;
const tagArg = /-/.test(version) ? "--tag next" : ""
const versionParts = version.split(".");
let tagArg = "";
if (versionParts[0] !== LATEST) {
tagArg = `--tag v${versionParts[0]}-maintenance`
} else if (/-/.test(version)) {
tagArg = "--tag next"
}
const lines = [];