mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
chore(v2): prepare v2.0.0-beta.0 release (#4774)
* beta.0 version docs + changelog * fix config for beta switch * v2.0.0-beta.0
This commit is contained in:
parent
fe6492aa87
commit
7e4d7671c8
103 changed files with 11779 additions and 149 deletions
|
@ -8,21 +8,18 @@
|
|||
const path = require('path');
|
||||
const versions = require('./versions.json');
|
||||
|
||||
// This probably only makes sense for the alpha phase, temporary
|
||||
function getNextAlphaVersionName() {
|
||||
const expectedPrefix = '2.0.0-alpha.';
|
||||
// This probably only makes sense for the beta phase, temporary
|
||||
function getNextBetaVersionName() {
|
||||
const expectedPrefix = '2.0.0-beta.';
|
||||
|
||||
const lastReleasedVersion = versions[0];
|
||||
if (!lastReleasedVersion.includes(expectedPrefix)) {
|
||||
throw new Error(
|
||||
'this code is only meant to be used during the 2.0 alpha phase.',
|
||||
'this code is only meant to be used during the 2.0 beta phase.',
|
||||
);
|
||||
}
|
||||
const alphaBuild = parseInt(
|
||||
lastReleasedVersion.replace(expectedPrefix, ''),
|
||||
10,
|
||||
);
|
||||
return `${expectedPrefix}${alphaBuild + 1}`;
|
||||
const version = parseInt(lastReleasedVersion.replace(expectedPrefix, ''), 10);
|
||||
return `${expectedPrefix}${version + 1}`;
|
||||
}
|
||||
|
||||
const allDocHomesPaths = [
|
||||
|
@ -240,7 +237,7 @@ const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
|
|||
: undefined,
|
||||
versions: {
|
||||
current: {
|
||||
label: `${getNextAlphaVersionName()} 🚧`,
|
||||
label: `${getNextBetaVersionName()} 🚧`,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue