| 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 output = "" | 675 output = "" |
| 676 for line in FileToText(version_file).splitlines(): | 676 for line in FileToText(version_file).splitlines(): |
| 677 if line.startswith("#define MAJOR_VERSION"): | 677 if line.startswith("#define MAJOR_VERSION"): |
| 678 line = re.sub("\d+$", self[prefix + "major"], line) | 678 line = re.sub("\d+$", self[prefix + "major"], line) |
| 679 elif line.startswith("#define MINOR_VERSION"): | 679 elif line.startswith("#define MINOR_VERSION"): |
| 680 line = re.sub("\d+$", self[prefix + "minor"], line) | 680 line = re.sub("\d+$", self[prefix + "minor"], line) |
| 681 elif line.startswith("#define BUILD_NUMBER"): | 681 elif line.startswith("#define BUILD_NUMBER"): |
| 682 line = re.sub("\d+$", self[prefix + "build"], line) | 682 line = re.sub("\d+$", self[prefix + "build"], line) |
| 683 elif line.startswith("#define PATCH_LEVEL"): | 683 elif line.startswith("#define PATCH_LEVEL"): |
| 684 line = re.sub("\d+$", self[prefix + "patch"], line) | 684 line = re.sub("\d+$", self[prefix + "patch"], line) |
| 685 elif (self[prefix + "candidate"] and |
| 686 line.startswith("#define IS_CANDIDATE_VERSION")): |
| 687 line = re.sub("\d+$", self[prefix + "candidate"], line) |
| 685 output += "%s\n" % line | 688 output += "%s\n" % line |
| 686 TextToFile(output, version_file) | 689 TextToFile(output, version_file) |
| 687 | 690 |
| 688 | 691 |
| 689 class BootstrapStep(Step): | 692 class BootstrapStep(Step): |
| 690 MESSAGE = "Bootstapping v8 checkout." | 693 MESSAGE = "Bootstapping v8 checkout." |
| 691 | 694 |
| 692 def RunStep(self): | 695 def RunStep(self): |
| 693 if os.path.realpath(self.default_cwd) == os.path.realpath(V8_BASE): | 696 if os.path.realpath(self.default_cwd) == os.path.realpath(V8_BASE): |
| 694 self.Die("Can't use v8 checkout with calling script as work checkout.") | 697 self.Die("Can't use v8 checkout with calling script as work checkout.") |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 for (number, step_class) in enumerate([BootstrapStep] + step_classes): | 862 for (number, step_class) in enumerate([BootstrapStep] + step_classes): |
| 860 steps.append(MakeStep(step_class, number, self._state, self._config, | 863 steps.append(MakeStep(step_class, number, self._state, self._config, |
| 861 options, self._side_effect_handler)) | 864 options, self._side_effect_handler)) |
| 862 for step in steps[options.step:]: | 865 for step in steps[options.step:]: |
| 863 if step.Run(): | 866 if step.Run(): |
| 864 return 0 | 867 return 0 |
| 865 return 0 | 868 return 0 |
| 866 | 869 |
| 867 def Run(self, args=None): | 870 def Run(self, args=None): |
| 868 return self.RunSteps(self._Steps(), args) | 871 return self.RunSteps(self._Steps(), args) |
| OLD | NEW |