From e04c0aef04e5706d899841c0951bd4e5a796576c Mon Sep 17 00:00:00 2001 From: Chenlei Yang Date: Wed, 8 Jul 2020 16:53:18 +0800 Subject: [PATCH 1/4] Add a special judge for Az.Accounts when bump version --- tools/VersionController/Models/VersionBumper.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/VersionController/Models/VersionBumper.cs b/tools/VersionController/Models/VersionBumper.cs index 9e77a54cb500..b4a4cfc4a0eb 100644 --- a/tools/VersionController/Models/VersionBumper.cs +++ b/tools/VersionController/Models/VersionBumper.cs @@ -171,6 +171,12 @@ private string GetBumpedVersion() { versionBump = Version.MINOR; } + // fix for https://github.com/Azure/azure-powershell/pull/12356 + // this only work when version is 1.9.x + if (splitVersion[0] == 1 && splitVersion[1] == 9 && versionBump == Version.MINOR) + { + versionBump = Version.PATCH; + } } // PATCH update for preview modules (0.x.x or x.x.x-preview) From 28e38ad730ab13eec5a801409854dcf04810f4e1 Mon Sep 17 00:00:00 2001 From: Chenlei Yang Date: Wed, 8 Jul 2020 16:56:24 +0800 Subject: [PATCH 2/4] Fix the comment --- tools/VersionController/Models/VersionBumper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/VersionController/Models/VersionBumper.cs b/tools/VersionController/Models/VersionBumper.cs index b4a4cfc4a0eb..b5c338b3e14e 100644 --- a/tools/VersionController/Models/VersionBumper.cs +++ b/tools/VersionController/Models/VersionBumper.cs @@ -171,8 +171,8 @@ private string GetBumpedVersion() { versionBump = Version.MINOR; } - // fix for https://github.com/Azure/azure-powershell/pull/12356 - // this only work when version is 1.9.x + // Fix for https://github.com/Azure/azure-powershell/pull/12356 + // This only work when version is 1.9.x if (splitVersion[0] == 1 && splitVersion[1] == 9 && versionBump == Version.MINOR) { versionBump = Version.PATCH; From 6a70582a1d15a6a8cd99551e72b8c9482b660851 Mon Sep 17 00:00:00 2001 From: Chenlei Yang Date: Wed, 8 Jul 2020 18:01:20 +0800 Subject: [PATCH 3/4] Add comments. --- tools/VersionController/Models/VersionBumper.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/VersionController/Models/VersionBumper.cs b/tools/VersionController/Models/VersionBumper.cs index b5c338b3e14e..66d75cbc6772 100644 --- a/tools/VersionController/Models/VersionBumper.cs +++ b/tools/VersionController/Models/VersionBumper.cs @@ -59,13 +59,13 @@ public void BumpAllVersions() Console.WriteLine("Updating version for " + _fileHelper.ModuleName + " from " + _oldVersion + " to " + _newVersion); } - UpdateSerializedAssemblyVersion(); + /*UpdateSerializedAssemblyVersion(); UpdateChangeLog(); var releaseNotes = GetReleaseNotes(); UpdateOutputModuleManifest(releaseNotes); UpdateRollupModuleManifest(); UpdateAssemblyInfo(); - UpdateDependentModules(); + UpdateDependentModules();*/ Console.WriteLine("Finished bumping version " + moduleName + "\n"); } @@ -171,8 +171,11 @@ private string GetBumpedVersion() { versionBump = Version.MINOR; } - // Fix for https://github.com/Azure/azure-powershell/pull/12356 - // This only work when version is 1.9.x + // for https://github.com/Azure/azure-powershell/pull/12356 + // Because of the wrong compare script in the link above, we need to avoid the minor bump when the version of Az.Accounts is 1.9.x + // So we add a special judge for it when the version is 1.9.x and the expect bump type is minor, + // we will change the type to patch so that it can work until 1.9.9.Once the version is greater or equal than 2.0.0 + // this special judge will not works anymore. if (splitVersion[0] == 1 && splitVersion[1] == 9 && versionBump == Version.MINOR) { versionBump = Version.PATCH; From af3a37e7b5172c947ef10c300c976de3daf175bf Mon Sep 17 00:00:00 2001 From: Chenlei Yang Date: Wed, 8 Jul 2020 18:21:02 +0800 Subject: [PATCH 4/4] remove the wrong comment --- tools/VersionController/Models/VersionBumper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/VersionController/Models/VersionBumper.cs b/tools/VersionController/Models/VersionBumper.cs index 66d75cbc6772..04e85a6054ad 100644 --- a/tools/VersionController/Models/VersionBumper.cs +++ b/tools/VersionController/Models/VersionBumper.cs @@ -59,13 +59,13 @@ public void BumpAllVersions() Console.WriteLine("Updating version for " + _fileHelper.ModuleName + " from " + _oldVersion + " to " + _newVersion); } - /*UpdateSerializedAssemblyVersion(); + UpdateSerializedAssemblyVersion(); UpdateChangeLog(); var releaseNotes = GetReleaseNotes(); UpdateOutputModuleManifest(releaseNotes); UpdateRollupModuleManifest(); UpdateAssemblyInfo(); - UpdateDependentModules();*/ + UpdateDependentModules(); Console.WriteLine("Finished bumping version " + moduleName + "\n"); }