Skip to content

Commit 3a2be2a

Browse files
committed
refactor: update platform name and arch to display
1 parent 5e3762a commit 3a2be2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/create-packages.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ for (let platform of platforms) {
1818
})
1919

2020
let name = `@todoctor/${platform.name}-${arch}`
21+
let displayName = platform.name[0].toUpperCase() + platform.name.slice(1)
22+
let displayArch = arch.toUpperCase()
2123

2224
fs.writeFile(
2325
path.join(packageDir, 'package.json'),
2426
JSON.stringify(
2527
{
2628
name,
27-
description: `Platform-specific binary for Todoctor (${platform.name}, ${arch})`,
29+
description: `Platform-specific binary for Todoctor (${displayName}, ${displayArch})`,
2830
version: rootPackageJson.version,
2931
repository: rootPackageJson.repository,
3032
author: rootPackageJson.author,
@@ -41,7 +43,7 @@ for (let platform of platforms) {
4143
fs.writeFile(
4244
path.join(packageDir, 'readme.md'),
4345
[
44-
`# Todoctor (${platform.name[0].toUpperCase() + platform.name.slice(1)}, ${arch.toUpperCase()})`,
46+
`# Todoctor (${displayName}, ${displayArch})`,
4547
'',
4648
'<img',
4749
' src="https://raw.githubusercontent.com/azat-io/todoctor/main/assets/logo-light.webp"',

0 commit comments

Comments
 (0)