| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 | 305 |
| 306 class ApplyChanges(Step): | 306 class ApplyChanges(Step): |
| 307 MESSAGE = "Apply squashed changes." | 307 MESSAGE = "Apply squashed changes." |
| 308 | 308 |
| 309 def RunStep(self): | 309 def RunStep(self): |
| 310 self.ApplyPatch(self.Config(PATCH_FILE)) | 310 self.ApplyPatch(self.Config(PATCH_FILE)) |
| 311 Command("rm", "-f %s*" % self.Config(PATCH_FILE)) | 311 Command("rm", "-f %s*" % self.Config(PATCH_FILE)) |
| 312 | 312 |
| 313 | 313 |
| 314 class AddChangeLog(Step): |
| 315 MESSAGE = "Add ChangeLog changes to trunk branch." |
| 316 |
| 317 def RunStep(self): |
| 318 # The change log has been modified by the patch. Reset it to the version |
| 319 # on trunk and apply the exact changes determined by this PrepareChangeLog |
| 320 # step above. |
| 321 self.GitCheckoutFile(self.Config(CHANGELOG_FILE)) |
| 322 changelog_entry = FileToText(self.Config(NEW_CHANGELOG_FILE)) |
| 323 old_change_log = FileToText(self.Config(CHANGELOG_FILE)) |
| 324 new_change_log = "%s\n\n\n%s" % (changelog_entry, old_change_log) |
| 325 TextToFile(new_change_log, self.Config(CHANGELOG_FILE)) |
| 326 os.remove(self.Config(NEW_CHANGELOG_FILE)) |
| 327 |
| 328 |
| 314 class SetVersion(Step): | 329 class SetVersion(Step): |
| 315 MESSAGE = "Set correct version for trunk." | 330 MESSAGE = "Set correct version for trunk." |
| 316 | 331 |
| 317 def RunStep(self): | 332 def RunStep(self): |
| 318 output = "" | 333 output = "" |
| 319 for line in FileToText(self.Config(VERSION_FILE)).splitlines(): | 334 for line in FileToText(self.Config(VERSION_FILE)).splitlines(): |
| 320 if line.startswith("#define MAJOR_VERSION"): | 335 if line.startswith("#define MAJOR_VERSION"): |
| 321 line = re.sub("\d+$", self["major"], line) | 336 line = re.sub("\d+$", self["major"], line) |
| 322 elif line.startswith("#define MINOR_VERSION"): | 337 elif line.startswith("#define MINOR_VERSION"): |
| 323 line = re.sub("\d+$", self["minor"], line) | 338 line = re.sub("\d+$", self["minor"], line) |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 PrepareChangeLog, | 537 PrepareChangeLog, |
| 523 EditChangeLog, | 538 EditChangeLog, |
| 524 IncrementVersion, | 539 IncrementVersion, |
| 525 CommitLocal, | 540 CommitLocal, |
| 526 UploadStep, | 541 UploadStep, |
| 527 CommitRepository, | 542 CommitRepository, |
| 528 StragglerCommits, | 543 StragglerCommits, |
| 529 SquashCommits, | 544 SquashCommits, |
| 530 NewBranch, | 545 NewBranch, |
| 531 ApplyChanges, | 546 ApplyChanges, |
| 547 AddChangeLog, |
| 532 SetVersion, | 548 SetVersion, |
| 533 CommitTrunk, | 549 CommitTrunk, |
| 534 SanityCheck, | 550 SanityCheck, |
| 535 CommitSVN, | 551 CommitSVN, |
| 536 TagRevision, | 552 TagRevision, |
| 537 CheckChromium, | 553 CheckChromium, |
| 538 SwitchChromium, | 554 SwitchChromium, |
| 539 UpdateChromiumCheckout, | 555 UpdateChromiumCheckout, |
| 540 UploadCL, | 556 UploadCL, |
| 541 SwitchV8, | 557 SwitchV8, |
| 542 CleanUp, | 558 CleanUp, |
| 543 ] | 559 ] |
| 544 | 560 |
| 545 | 561 |
| 546 if __name__ == "__main__": # pragma: no cover | 562 if __name__ == "__main__": # pragma: no cover |
| 547 sys.exit(PushToTrunk(CONFIG).Run()) | 563 sys.exit(PushToTrunk(CONFIG).Run()) |
| OLD | NEW |