| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """ Check out the Skia sources. """ | 6 """ Check out the Skia sources. """ |
| 7 | 7 |
| 8 | 8 |
| 9 from build_step import BuildStep | 9 from build_step import BuildStep |
| 10 from flavor_utils import moz2d_canary_build_step_utils | 10 from flavor_utils import moz2d_canary_build_step_utils |
| 11 from update import Update | 11 from update import Update |
| 12 from utils import misc | 12 from py.utils import misc |
| 13 from utils import shell_utils | 13 from py.utils import shell_utils |
| 14 | 14 |
| 15 import sys | 15 import sys |
| 16 | 16 |
| 17 | 17 |
| 18 class Moz2DCanaryUpdate(Update): | 18 class Moz2DCanaryUpdate(Update): |
| 19 def __init__(self, **kwargs): | 19 def __init__(self, **kwargs): |
| 20 super(Moz2DCanaryUpdate, self).__init__(**kwargs) | 20 super(Moz2DCanaryUpdate, self).__init__(**kwargs) |
| 21 | 21 |
| 22 def _Run(self): | 22 def _Run(self): |
| 23 super(Moz2DCanaryUpdate, self)._Run() | 23 super(Moz2DCanaryUpdate, self)._Run() |
| 24 with misc.ChDir(moz2d_canary_build_step_utils.MOZ2D_DIR): | 24 with misc.ChDir(moz2d_canary_build_step_utils.MOZ2D_DIR): |
| 25 moz2d_rev = shell_utils.run(['git', 'rev-parse', 'HEAD'], | 25 moz2d_rev = shell_utils.run(['git', 'rev-parse', 'HEAD'], |
| 26 log_in_real_time=False) | 26 log_in_real_time=False) |
| 27 print 'Moz2D updated to %s' % moz2d_rev | 27 print 'Moz2D updated to %s' % moz2d_rev |
| 28 | 28 |
| 29 | 29 |
| 30 if '__main__' == __name__: | 30 if '__main__' == __name__: |
| 31 sys.exit(BuildStep.RunBuildStep(Moz2DCanaryUpdate)) | 31 sys.exit(BuildStep.RunBuildStep(Moz2DCanaryUpdate)) |
| OLD | NEW |