Skip to content

Commit

Permalink
Update generate-publish-script to handle maintenance releases
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Jul 30, 2021
1 parent 1750690 commit 297dd81
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/generate-publish-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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 = [];

Expand Down

0 comments on commit 297dd81

Please sign in to comment.