Skip to content

Commit cb8e2cf

Browse files
authored
Merge pull request #2208 from pie-framework/chore/wf
chore(release): add --major flag to scripts/release, enable on master…
2 parents 2f2fd13 + 25473db commit cb8e2cf

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,19 @@ jobs:
7575
cache: yarn
7676
- run: yarn install
7777
- run: scripts/release --build
78-
- run: scripts/release --release --loglevel verbose
78+
# ─────────────────────────────────────────────────────────────────────
79+
# TEMPORARY: --major forces every publishable package to a new major
80+
# version on the next publish. This is in place ONLY for the platform
81+
# upgrade release (React 18, MUI v7, Node 24, test stack modernization).
82+
#
83+
# REVERT THIS IMMEDIATELY AFTER THE PLATFORM RELEASE PUBLISHES.
84+
#
85+
# How to revert: open a follow-up PR to master that removes the
86+
# --major flag from the line below, restoring:
87+
# - run: scripts/release --release --loglevel verbose
88+
#
89+
# Leaving --major in place will bump every package to the next major
90+
# on EVERY subsequent merge to master, which is almost certainly not
91+
# what you want.
92+
# ─────────────────────────────────────────────────────────────────────
93+
- run: scripts/release --release --major --loglevel verbose

scripts/release

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const CWD = process.cwd();
2626
* - `next`: Defaults to `false`.
2727
*/
2828
const argv = minimist(process.argv.slice(2), {
29-
boolean: ['dry-run', 'next', 'build', 'test', 'release'],
29+
boolean: ['dry-run', 'next', 'build', 'test', 'release', 'major'],
3030
string: ['loglevel'],
31-
default: { 'dry-run': false, next: false, build: false, test: false, release: false },
31+
default: { 'dry-run': false, next: false, build: false, test: false, release: false, major: false },
3232
});
3333

3434
/**
@@ -160,7 +160,14 @@ const test = () => {
160160
*/
161161
const release = () => {
162162
log(chalk.magenta('--- STEP 5: VERSION PACKAGES ---'));
163-
runCmd('npx lerna version --conventional-commits --yes');
163+
// --major forces a major bump on every publishable package, bypassing
164+
// conventional-commits inference. Use this for coordinated platform
165+
// upgrades (peerDep changes for React, MUI, etc.) where every package
166+
// must move to a new major in lockstep.
167+
const versionCmd = argv.major
168+
? 'npx lerna version major --force-publish=* --yes'
169+
: 'npx lerna version --conventional-commits --yes';
170+
runCmd(versionCmd);
164171

165172
log(chalk.magenta('--- STEP 6: PUBLISH PACKAGES ---'));
166173
let releaseCmd = 'npx lerna publish from-git --yes';

0 commit comments

Comments
 (0)