Skip to content

Commit

Permalink
Allowing user to customize pixi version label
Browse files Browse the repository at this point in the history
  • Loading branch information
bbazukun123 committed Jan 16, 2024
1 parent 83c4601 commit 18dbf9b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/pixi-version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"versionLabel": "prerelease-v8",
"versionLabel": "v8.x",
"version": "8.0.0-rc.4",
"releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.0.0-rc.4",
"build": "https://pixijs.download/v8.0.0-rc.4/pixi.min.js",
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const config = {
},

current: {
label: 'prerelease-v8',
label: 'v8.x',
banner: 'none',
badge: false,
},
Expand Down
2 changes: 1 addition & 1 deletion pixi-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"isCurrent": false
},
{
"versionLabel": "prerelease-v8",
"versionLabel": "v8.x",
"version": "8.0.0-rc.4",
"releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.0.0-rc.4",
"build": "https://pixijs.download/v8.0.0-rc.4/pixi.min.js",
Expand Down
13 changes: 13 additions & 0 deletions scripts/generate-pixi-version-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,19 @@ async function doesVersionConfigExist(version)
versionLabel = `v${version}`;
}

// Prompt the user to confirm or customize the version label
versionLabel = (
await inquirer.prompt([
{
type: 'input',
name: 'versionLabel',
message: 'Confirm or customize the version label:',
default: versionLabel,
validate: (input) => input.trim().length > 0,
},
])
).versionLabel;

config = {
versionLabel,
version,
Expand Down

0 comments on commit 18dbf9b

Please sign in to comment.