Skip to content

Commit 0472b58

Browse files
committed
website: re-generate commons
1 parent 87657db commit 0472b58

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

website/customFields.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,39 @@ export function getCustomFields() {
1717
const topFileContent = fs.readFileSync(topFilePath);
1818

1919
const topPackageJson = JSON.parse(topFileContent.toString());
20-
const releaseVersion = topPackageJson.version.replace(/[.-]pre/, '');
20+
const packageVersion = topPackageJson.version;
21+
// Remove the pre used during development.
22+
const releaseVersion = packageVersion.replace(/[.-]pre.*/, '');
23+
// Remove the pre-release.
24+
const releaseSemver = releaseVersion.replace(/[-].*$/, '');
25+
26+
let upstreamVersion = releaseSemver;
27+
28+
let versionFields = {
29+
packageVersion,
30+
releaseVersion,
31+
releaseSemver,
32+
upstreamVersion,
33+
}
2134

2235
console.log(`package version: ${topPackageJson.version}`);
2336

24-
let versionFields;
25-
2637
if (topPackageJson.xpack && !releaseVersion.startsWith('0.0.0')) {
38+
2739
// Remove the first part, up to the last dot.
2840
const npmSubversion = releaseVersion.replace(/^.*[.]/, '');
2941

3042
// Remove from the last dot to the end.
3143
const xpackVersion = releaseVersion.replace(/[.][0-9]*$/, '');
3244

33-
// Remove the pre-release.
34-
const xpackSemver = xpackVersion.replace(/[-].*$/, '');
35-
3645
// Remove the first part, up to the dash.
3746
const xpackSubversion = xpackVersion.replace(/^.*[-]/, '');
3847

39-
let upstreamVersion = xpackSemver;
40-
4148
versionFields = {
42-
releaseVersion,
49+
...versionFields,
4350
xpackVersion,
44-
xpackSemver,
4551
xpackSubversion,
4652
npmSubversion,
47-
upstreamVersion,
48-
}
49-
} else {
50-
versionFields = {
51-
releaseVersion
5253
}
5354
}
5455

website/docs/install/index.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,9 @@ The Windows versions of **xPack MinGW-w64 GCC**
555555
are packed as `.zip` files.
556556
Download the latest version named like:
557557

558-
- <code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-win32-x64.zip</code>
558+
<ul>
559+
<li><code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-win32-x64.zip</code></li>
560+
</ul>
559561

560562
:::note
561563

@@ -587,7 +589,10 @@ The macOS versions of **xPack MinGW-w64 GCC**
587589
are packed as `.tar.gz` archives.
588590
Download the latest version named like:
589591

590-
- <code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-darwin-x64.tar.gz</code>- <code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-darwin-arm64.tar.gz</code>
592+
<ul>
593+
<li><code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-darwin-x64.tar.gz</code></li>
594+
<li><code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-darwin-arm64.tar.gz</code></li>
595+
</ul>
591596

592597
:::note
593598

@@ -619,7 +624,11 @@ The GNU/Linux versions of **xPack MinGW-w64 GCC**
619624
are packed as `.tar.gz` archives.
620625
Download the latest version named like:
621626

622-
- <code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-linux-x64.tar.gz</code>- <code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-linux-arm64.tar.gz</code>- <code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-linux-arm.tar.gz</code>
627+
<ul>
628+
<li><code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-linux-x64.tar.gz</code></li>
629+
<li><code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-linux-arm64.tar.gz</code></li>
630+
<li><code>xpack-mingw-w64-gcc-{customField('xpackVersion')}-linux-arm.tar.gz</code></li>
631+
</ul>
623632

624633
:::note
625634

website/docs/user/_common/_arm-toolchain-versioning.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ upstream **Arm GNU Toolchain** project is a bit unusual and unstable in time,
2020
(like <code>{versionMajor()}.{versionMinor()}.Rel1</code>)
2121
therefore the upstream GCC version is preferred, which
2222
is a three number string
23-
like <code>{customField('xpackSemver')}</code>;
23+
like <code>{customField('releaseSemver')}</code>;
2424
to this string the xPack distribution adds a fourth number that represents
2525
the Arm release with the same GCC release, and a fifth number
2626
that represents the xPack release of the same Arm release;
2727
since [SemVer](https://semver.org) allows only three numbers,
2828
all additional ones can
2929
be added only as pre-release strings, separated by a dash,
30-
like <code>{customField('xpackSemver')}-<b>{customField('xpackSubversion')}</b></code>. When
30+
like <code>{customField('releaseSemver')}-<b>{customField('xpackSubversion')}</b></code>. When
3131
published as a npm package, the version gets
3232
a sixth number,
3333
like <code>{customField('xpackVersion')}.<b>{customField('npmSubversion')}</b></code>.

website/docs/user/_common/_versioning.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import LinksVsForwarders from '@site/src/components/LinksVsForwarders'
1515
The version string used by the
1616
upstream {props.upstreamName ? props.upstreamName : 'MinGW-w64 GCC'} project
1717
is a three number string
18-
like <code>{customField('xpackSemver')}</code>;
18+
like <code>{customField('releaseSemver')}</code>;
1919
to this string the xPack distribution adds a fourth number,
2020
but since [SemVer](https://semver.org) allows only three numbers,
2121
all additional ones can
2222
be added only as pre-release strings, separated by a dash,
23-
like <code>{customField('xpackSemver')}-<b>{customField('xpackSubversion')}</b></code>. When
23+
like <code>{customField('releaseSemver')}-<b>{customField('xpackSubversion')}</b></code>. When
2424
published as a npm package, the version gets
2525
a fifth number,
2626
like <code>{customField('xpackVersion')}.<b>{customField('npmSubversion')}</b></code>.

website/docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ const config: Config = {
275275
label: 'GitHub',
276276
items: [
277277
{
278-
label: `mingw-w64-gcc-xpack`,
278+
label: `mingw-w64-gcc-xpack project`,
279279
href: `https://github.com/xpack-dev-tools/mingw-w64-gcc-xpack/`,
280280
},
281281
{
@@ -348,7 +348,7 @@ const config: Config = {
348348
href: 'https://www.paypal.com/donate/?hosted_button_id=5MFRG9ZRBETQ8',
349349
},
350350
{
351-
label: 'GitHub mingw-w64-gcc-xpack',
351+
label: 'GitHub mingw-w64-gcc-xpack project',
352352
href: 'https://github.com/xpack-dev-tools/mingw-w64-gcc-xpack/',
353353
},
354354
{

0 commit comments

Comments
 (0)