Skip to content

Commit

Permalink
improve publish instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Oct 10, 2017
1 parent 29fe5d9 commit b061f2e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tools/update-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,17 @@ const showPublishInfo = collated => {
"publish command: node_modules/.bin/lerna publish",
(collated.forcePackages || []).map(p => `--force-publish ${p}`).join(" ")
);
const generatorNeedUpdate = collated.realPackages.find(p => {
const majorBumps = collated.realPackages.filter(p => {
const pkg = collated.packages[mapPkg(p)];
return (
p.startsWith("electrode-archetype-react") &&
pkg.newVersion.split(".")[0] > pkg.version.split(".")[0]
);
return pkg.newVersion.split(".")[0] > pkg.version.split(".")[0];
});
if (generatorNeedUpdate) {
const majorArchetypes = majorBumps.filter(p => p.startsWith("electrode-archetype-react"));
if (majorArchetypes.length > 0) {
console.log(
"One of the archetype modules had a major bump, make sure generator-electrode is updated before publishing."
`\nThese archetypes had major bumps:\n\n${majorArchetypes.join("\n")}`,
"\n\nBefore publishing, make sure:",
"\n\n- generator-electrode is updated",
"\n- The -dev archetype's peer dep is updated\n"
);
}
};
Expand Down

0 comments on commit b061f2e

Please sign in to comment.