From 1fdc6808b11f951974f537b9b2e7df689e369f75 Mon Sep 17 00:00:00 2001 From: Anna Wen <54281166+annawen1@users.noreply.github.com> Date: Tue, 31 Jan 2023 11:55:55 -0500 Subject: [PATCH] chore(changelog): incorporate cwc into change log task --- tasks/get-changelog.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tasks/get-changelog.js b/tasks/get-changelog.js index ffe1f115e5a..a480bcba0d2 100644 --- a/tasks/get-changelog.js +++ b/tasks/get-changelog.js @@ -1,7 +1,7 @@ #!/usr/bin/env node /** - * Copyright IBM Corp. 2020, 2022 + * Copyright IBM Corp. 2020, 2023 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -18,6 +18,10 @@ program .option( '-v, --wcVersion ', 'Web Components release version' + ) + .option( + '-c, --cwcVersion ', + 'Carbon Web Components release version' ); /** @@ -48,6 +52,13 @@ const { tagTo } = args; */ const { wcVersion } = args; +/** + * Web Components release version (-v) + * + * @type {string} + */ +const { cwcVersion } = args; + /** * Uses a delimiter for splitting the comments into an array * @@ -119,6 +130,10 @@ function getChangelog(pkgName, folder) { changelog = `## ${pkgName} (${wcVersion})\n`; } + if (pkgName === 'Carbon Web Components') { + changelog = `## ${pkgName} (${cwcVersion})\n`; + } + // Stores the list of features const features = {}; @@ -215,6 +230,10 @@ function getChangelog(pkgName, folder) { function generateLog() { let log = ''; + log += getChangelog( + 'Carbon Web Components', + './packages/carbon-web-components' + ); log += getChangelog('Web Components', './packages/web-components'); log += getChangelog('React', './packages/react'); log += getChangelog('Styles', './packages/styles');