| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """An auto-roller for GN binaries into Chromium. | 5 """An auto-roller for GN binaries into Chromium. |
| 6 | 6 |
| 7 This script is used to update the GN binaries that a Chromium | 7 This script is used to update the GN binaries that a Chromium |
| 8 checkout uses. In order to update the binaries, one must follow | 8 checkout uses. In order to update the binaries, one must follow |
| 9 four steps in order: | 9 four steps in order: |
| 10 | 10 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 def GetDEPSRollDesc(self, old_buildtools_commitish, new_buildtools_commitish): | 348 def GetDEPSRollDesc(self, old_buildtools_commitish, new_buildtools_commitish): |
| 349 gn_changes = self.GetGNChanges() | 349 gn_changes = self.GetGNChanges() |
| 350 | 350 |
| 351 return ( | 351 return ( |
| 352 'Roll DEPS %s..%s\n' | 352 'Roll DEPS %s..%s\n' |
| 353 '\n' | 353 '\n' |
| 354 ' in order to roll GN %s..%s (r%s:%s)\n' | 354 ' in order to roll GN %s..%s (r%s:%s)\n' |
| 355 '\n' | 355 '\n' |
| 356 '%s' | 356 '%s' |
| 357 '\n' | 357 '\n' |
| 358 'TBR=%s\n' % ( | 358 'TBR=%s\n' |
| 359 'CQ_EXTRA_TRYBOTS=tryserver.chromium.mac:mac_chromium_gn_rel,' |
| 360 'mac_chromium_gn_dbg;' |
| 361 'tryserver.chromium.win:win8_chromium_gn_dbg,' |
| 362 'win_chromium_gn_x64_rel\n' % ( |
| 359 old_buildtools_commitish, | 363 old_buildtools_commitish, |
| 360 new_buildtools_commitish, | 364 new_buildtools_commitish, |
| 361 self.old_gn_commitish, | 365 self.old_gn_commitish, |
| 362 self.new_gn_commitish, | 366 self.new_gn_commitish, |
| 363 self.old_gn_version, | 367 self.old_gn_version, |
| 364 self.new_gn_version, | 368 self.new_gn_version, |
| 365 gn_changes, | 369 gn_changes, |
| 366 self.reviewer, | 370 self.reviewer, |
| 367 )) | 371 )) |
| 368 | 372 |
| 369 def GetGNChanges(self): | 373 def GetGNChanges(self): |
| 370 _, out, _ = self.Call( | 374 _, out, _ = self.Call( |
| 371 "git log --pretty=' %h %s' " + | 375 "git log --pretty=' %h %s' " + |
| 372 "%s..%s tools/gn" % (self.old_gn_commitish, self.new_gn_commitish)) | 376 "%s..%s tools/gn" % (self.old_gn_commitish, self.new_gn_commitish)) |
| 373 return out | 377 return out |
| 374 | 378 |
| 375 def Call(self, cmd, cwd=None): | 379 def Call(self, cmd, cwd=None): |
| 376 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True, | 380 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True, |
| 377 cwd=(cwd or self.chromium_src_dir)) | 381 cwd=(cwd or self.chromium_src_dir)) |
| 378 out, err = proc.communicate() | 382 out, err = proc.communicate() |
| 379 return proc.returncode, out, err | 383 return proc.returncode, out, err |
| 380 | 384 |
| 381 | 385 |
| 382 if __name__ == '__main__': | 386 if __name__ == '__main__': |
| 383 roller = GNRoller() | 387 roller = GNRoller() |
| 384 sys.exit(roller.Roll()) | 388 sys.exit(roller.Roll()) |
| OLD | NEW |