From 83f33e54ff5607ed31b5c66b988de5832779c17b Mon Sep 17 00:00:00 2001 From: PurohitPoornima <120371328+PurohitPoornima@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:18:22 +0530 Subject: [PATCH] adding the branding property in index.json (#373) --- index.json | 8 ++++++++ src/helpers/InfoHelper.js | 3 ++- src/scripts/generateIndex.js | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index 373c2eb..6778f20 100644 --- a/index.json +++ b/index.json @@ -693,6 +693,10 @@ "Rebranding: Name of the plugin is changed from HCL OneTest Server to HCL DevOps Test Server." ], "supports": "2.5.0" + }, + "branding": { + "name": "HCL DevOps Test server", + "version": "1.0.27" } }, "ucv-ext-rally": { @@ -823,6 +827,10 @@ "Releasing again for prev version changes" ], "supports": "4.0.13" + }, + "branding": { + "name": "IBM DevOps Deploy", + "version": "4.0.4" } }, "ucv-ext-versionone": { diff --git a/src/helpers/InfoHelper.js b/src/helpers/InfoHelper.js index 8de8ab7..edb0989 100644 --- a/src/helpers/InfoHelper.js +++ b/src/helpers/InfoHelper.js @@ -26,7 +26,8 @@ export default class InfoHelper { author: Joi.object().required().error(() => ERROR_TEXT.Author).keys({ name: Joi.string().required().error(() => ERROR_TEXT.AuthorName), email: Joi.string().required().email().error(() => ERROR_TEXT.AuthorEmail) - }) + }), + branding:Joi.object() } } diff --git a/src/scripts/generateIndex.js b/src/scripts/generateIndex.js index e2a0b5d..8f4c273 100644 --- a/src/scripts/generateIndex.js +++ b/src/scripts/generateIndex.js @@ -31,6 +31,12 @@ logger.level = process.env.LOG_LEVEL || 'INFO' notes: latestRelease.notes || [] } } + if(info.branding.brandingName && info.branding.brandingVersion) { + indexJson[plugin].branding = { + name: info.branding.brandingName ? info.branding.brandingName : '', + version: info.branding.brandingVersion ? info.branding.brandingVersion : '' + } + } if (latestRelease.supports) { indexJson[plugin].current.supports = latestRelease.supports }