Bug 1407602 - Make central version bump conditional r=jlund DONTBUILD draft
authorRail Aliiev <rail@mozilla.com>
Wed, 01 Nov 2017 13:40:08 -0400
changeset 690124 3fc715a6ece2bfeaa4866590b8ff23a6813469d9
parent 690034 cd7217cf05a2332a8fd7b498767a07b2c31ea657
child 738498 73a1f11355865d61944da70ede451af0f6701127
push id87221
push userbmo:rail@mozilla.com
push dateWed, 01 Nov 2017 17:40:31 +0000
reviewersjlund
bugs1407602
milestone58.0a1
Bug 1407602 - Make central version bump conditional r=jlund DONTBUILD MozReview-Commit-ID: EZ8y3afDrwv
testing/mozharness/scripts/merge_day/gecko_migration.py
--- a/testing/mozharness/scripts/merge_day/gecko_migration.py
+++ b/testing/mozharness/scripts/merge_day/gecko_migration.py
@@ -65,16 +65,22 @@ class GeckoMigration(MercurialScript, Ba
             "help": "The file containing the Balrog credentials.",
         }],
         [['--remove-locale', ], {
             "action": "extend",
             "dest": "remove_locales",
             "type": "string",
             "help": "Comma separated list of locales to remove from the 'to' repo.",
         }],
+        [['--no-central-version-bump'], {
+            "action": "store_true",
+            "dest": "no_central_version_bump",
+            "default": False,
+            "help": "Do not bump in-tree version in mozilla-central"}
+         ],
     ]
     gecko_repos = None
 
     def __init__(self, require_config_file=True):
         super(GeckoMigration, self).__init__(
             config_options=virtualenv_config_options + self.config_options,
             all_actions=[
                 'clobber',
@@ -324,24 +330,25 @@ class GeckoMigration(MercurialScript, Ba
             what happens in each workflow, while allowing for things like
             staging beta user repo migrations.
             """
         dirs = self.query_abs_dirs()
         next_mb_version = self.get_version(dirs['abs_to_dir'])[0]
         self.bump_version(dirs['abs_to_dir'], next_mb_version, next_mb_version, "a1", "",
                           use_config_suffix=True)
         self.apply_replacements()
-        # bump m-c version
-        curr_mc_version = self.get_version(dirs['abs_from_dir'])[0]
-        next_mc_version = str(int(curr_mc_version) + 1)
-        self.bump_version(
-            dirs['abs_from_dir'], curr_mc_version, next_mc_version, "a1", "a1",
-            bump_major=True,
-            use_config_suffix=False
-        )
+        if not self.config['no_central_version_bump']:
+            # bump m-c version
+            curr_mc_version = self.get_version(dirs['abs_from_dir'])[0]
+            next_mc_version = str(int(curr_mc_version) + 1)
+            self.bump_version(
+                dirs['abs_from_dir'], curr_mc_version, next_mc_version, "a1", "a1",
+                bump_major=True,
+                use_config_suffix=False
+            )
         # touch clobber files
         self.touch_clobber_file(dirs['abs_from_dir'])
         self.touch_clobber_file(dirs['abs_to_dir'])
 
     def beta_to_release(self, *args, **kwargs):
         """ mozilla-beta -> mozilla-release behavior.
 
             We could have all of these individually toggled by flags, but