From da92065e07418a9bb676eaa058eba408b79259ba Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Fri, 8 Jan 2021 12:03:36 -0800 Subject: [PATCH 1/2] Update updateChangelog parameters to Boolean --- eng/tools/versioning/VersionUtils.js | 11 +++++++++-- eng/tools/versioning/increment.js | 4 ++-- eng/tools/versioning/set-version.js | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/eng/tools/versioning/VersionUtils.js b/eng/tools/versioning/VersionUtils.js index 1d2646f04fbc..0410519b9e45 100644 --- a/eng/tools/versioning/VersionUtils.js +++ b/eng/tools/versioning/VersionUtils.js @@ -38,14 +38,21 @@ function updateChangelog( repoRoot, newVersion, unreleased, - replaceVersion, + replaceLatestVersionTitle, releaseDate = null ) { const service = path.basename(path.dirname(targetPackagePath)); const updateChangelogPath = path.resolve( path.join(repoRoot, "eng/common/scripts/Update-ChangeLog.ps1") ); - let args = [updateChangelogPath, newVersion, service, packageName, unreleased, replaceVersion]; + let args = [ + updateChangelogPath, + newVersion, + service, + packageName, + unreleased, + replaceLatestVersionTitle + ]; if (releaseDate != null) { args.push(releaseDate); } diff --git a/eng/tools/versioning/increment.js b/eng/tools/versioning/increment.js index a4b462683747..11e4638e4dcb 100644 --- a/eng/tools/versioning/increment.js +++ b/eng/tools/versioning/increment.js @@ -68,8 +68,8 @@ async function main(argv) { artifactName, repoRoot, newVersion, - true, - false + "--Unreleased:$true", + "--ReplaceLatestEntryTitle:$false" ); if (!updateStatus) { process.exit(1); diff --git a/eng/tools/versioning/set-version.js b/eng/tools/versioning/set-version.js index a3fc9f910796..aba9d505b7c2 100644 --- a/eng/tools/versioning/set-version.js +++ b/eng/tools/versioning/set-version.js @@ -72,8 +72,8 @@ async function main(argv) { artifactName, repoRoot, newVersion, - false, - true, + "--Unreleased:$false", + "--ReplaceLatestEntryTitle:$true", releaseDate ); if (!updateStatus) { From 6813bd2906b139c6eefb24bf90a717245f39c09f Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Fri, 29 Jan 2021 16:59:04 -0800 Subject: [PATCH 2/2] Add parameter names to args array --- eng/tools/versioning/VersionUtils.js | 7 +++++-- eng/tools/versioning/increment.js | 4 ++-- eng/tools/versioning/set-version.js | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eng/tools/versioning/VersionUtils.js b/eng/tools/versioning/VersionUtils.js index 0410519b9e45..ea9661aef790 100644 --- a/eng/tools/versioning/VersionUtils.js +++ b/eng/tools/versioning/VersionUtils.js @@ -47,11 +47,14 @@ function updateChangelog( ); let args = [ updateChangelogPath, + "--Version", newVersion, + "--ServiceDirectory", service, + "--PackageName", packageName, - unreleased, - replaceLatestVersionTitle + "--Unreleased:$" + unreleased, + "--ReplaceLatestEntryTitle:$" + replaceLatestVersionTitle ]; if (releaseDate != null) { args.push(releaseDate); diff --git a/eng/tools/versioning/increment.js b/eng/tools/versioning/increment.js index 11e4638e4dcb..a4b462683747 100644 --- a/eng/tools/versioning/increment.js +++ b/eng/tools/versioning/increment.js @@ -68,8 +68,8 @@ async function main(argv) { artifactName, repoRoot, newVersion, - "--Unreleased:$true", - "--ReplaceLatestEntryTitle:$false" + true, + false ); if (!updateStatus) { process.exit(1); diff --git a/eng/tools/versioning/set-version.js b/eng/tools/versioning/set-version.js index aba9d505b7c2..a3fc9f910796 100644 --- a/eng/tools/versioning/set-version.js +++ b/eng/tools/versioning/set-version.js @@ -72,8 +72,8 @@ async function main(argv) { artifactName, repoRoot, newVersion, - "--Unreleased:$false", - "--ReplaceLatestEntryTitle:$true", + false, + true, releaseDate ); if (!updateStatus) {