From 18dbf9b74db53bb7e93af2fb47800027b3ef4fb2 Mon Sep 17 00:00:00 2001 From: Baz Utsahajit Date: Tue, 16 Jan 2024 23:08:15 +0000 Subject: [PATCH] Allowing user to customize pixi version label --- docs/pixi-version.json | 2 +- docusaurus.config.js | 2 +- pixi-versions.json | 2 +- scripts/generate-pixi-version-config.js | 13 +++++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/pixi-version.json b/docs/pixi-version.json index 70c33d85c..8a7ee5569 100644 --- a/docs/pixi-version.json +++ b/docs/pixi-version.json @@ -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", diff --git a/docusaurus.config.js b/docusaurus.config.js index b514113d2..7f8569805 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -51,7 +51,7 @@ const config = { }, current: { - label: 'prerelease-v8', + label: 'v8.x', banner: 'none', badge: false, }, diff --git a/pixi-versions.json b/pixi-versions.json index d6fa88976..80bba9073 100644 --- a/pixi-versions.json +++ b/pixi-versions.json @@ -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", diff --git a/scripts/generate-pixi-version-config.js b/scripts/generate-pixi-version-config.js index 85e7109eb..fa5138a3e 100644 --- a/scripts/generate-pixi-version-config.js +++ b/scripts/generate-pixi-version-config.js @@ -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,