From 297dd8132708a2510d10a45c2b101c920de704b1 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 30 Jul 2021 10:44:46 +0100 Subject: [PATCH] Update generate-publish-script to handle maintenance releases --- scripts/generate-publish-script.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/generate-publish-script.js b/scripts/generate-publish-script.js index 45a4e8423..7bcbb7fc6 100644 --- a/scripts/generate-publish-script.js +++ b/scripts/generate-publish-script.js @@ -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 = [];