Skip to content

Commit

Permalink
adapt config getNextVersionName
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jul 14, 2022
1 parent 6bf8490 commit ed9c52e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const ArchivedVersionsDropdownItems = Object.entries(VersionsArchived).splice(
5,
);

// This probably only makes sense for the beta phase, temporary
function getNextBetaVersionName() {
const expectedPrefix = '2.0.0-beta.';
// This probably only makes sense for the alpha/beta/rc phase, temporary
function getNextVersionName() {
const expectedPrefix = '2.0.0-rc.';

const lastReleasedVersion = versions[0];
if (!lastReleasedVersion || !lastReleasedVersion.includes(expectedPrefix)) {
throw new Error(
'this code is only meant to be used during the 2.0 beta phase.',
'this code is only meant to be used during the 2.0 alpha/beta/rc phase.',
);
}
const version = parseInt(lastReleasedVersion.replace(expectedPrefix, ''), 10);
Expand Down Expand Up @@ -310,7 +310,7 @@ const config = {
})(),
versions: {
current: {
label: `${getNextBetaVersionName()} 🚧`,
label: `${getNextVersionName()} 🚧`,
},
},
},
Expand Down

0 comments on commit ed9c52e

Please sign in to comment.