Skip to content

Commit

Permalink
Merge pull request #17884 from ckeditor/cc/7040
Browse files Browse the repository at this point in the history
Internal: Added support in release scripts for publishing the next pre-release version.
  • Loading branch information
pomek authored Feb 10, 2025
2 parents 602d4e1 + 0beafa7 commit b537e6d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scripts/release/utils/getcdnversion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@

/**
* @param {ReleaseOptions} cliArguments
* @returns {'alpha'|'nightly'|'staging'|'internal'}
* @returns {'alpha'|'nightly'|'nightly-next'|'staging'|'internal'}
*/
export default function getCdnVersion( cliArguments ) {
if ( cliArguments.nightly ) {
return 'nightly';
}

if ( cliArguments.nightlyNext ) {
return 'nightly-next';
}

if ( cliArguments.nightlyAlpha ) {
return 'alpha';
}
Expand Down
8 changes: 8 additions & 0 deletions scripts/release/utils/getreleasedescription.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ export default async function getReleaseDescription( cliArguments ) {
];
}

if ( cliArguments.nightlyNext ) {
const releaseIdentifier = `0.0.0-nightly-next-${ releaseTools.getDateIdentifier() }`;

return [
await releaseTools.getNextPreRelease( releaseIdentifier ), null
];
}

if ( cliArguments.nightly ) {
return [
await releaseTools.getNextNightly(), null
Expand Down
1 change: 1 addition & 0 deletions scripts/release/utils/isnoncommittablerelease.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
export default function isNonCommittableRelease( cliArguments ) {
return [
cliArguments.nightlyAlpha,
cliArguments.nightlyNext,
cliArguments.nightly,
cliArguments.internal
].some( value => value === true );
Expand Down
12 changes: 11 additions & 1 deletion scripts/release/utils/parsearguments.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function parseArguments( cliArguments ) {
'internal',
'nightly',
'nightly-alpha',
'nightly-next',
'verbose',
'compile-only',
'ci',
Expand All @@ -40,6 +41,7 @@ export default function parseArguments( cliArguments ) {
internal: false,
nightly: false,
'nightly-alpha': false,
'nightly-next': false,
concurrency: os.cpus().length / 2,
'compile-only': false,
packages: null,
Expand All @@ -60,7 +62,8 @@ export default function parseArguments( cliArguments ) {
replaceKebabCaseWithCamelCase( options, [
'npm-tag',
'compile-only',
'nightly-alpha'
'nightly-alpha',
'nightly-next'
] );

if ( options.nightly ) {
Expand All @@ -72,6 +75,11 @@ export default function parseArguments( cliArguments ) {
options.npmTag = 'alpha';
}

if ( options.nightlyNext ) {
options.branch = 'master-it84';
options.npmTag = 'nightly-next';
}

if ( options.internal ) {
options.npmTag = 'internal';
}
Expand All @@ -92,6 +100,8 @@ export default function parseArguments( cliArguments ) {
*
* @property {Boolean} nightlyAlpha
*
* @property {Boolean} nightlyNext
*
* @property {Boolean} external
*
* @property {Boolean} [compileOnly=false]
Expand Down

0 comments on commit b537e6d

Please sign in to comment.