| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Windows can't run .sh files, so this is a Python implementation of | 6 """Windows can't run .sh files, so this is a Python implementation of |
| 7 update.sh. This script should replace update.sh on all platforms eventually.""" | 7 update.sh. This script should replace update.sh on all platforms eventually.""" |
| 8 | 8 |
| 9 import argparse | 9 import argparse |
| 10 import contextlib | 10 import contextlib |
| 11 import cStringIO | 11 import cStringIO |
| 12 import os | 12 import os |
| 13 import re | 13 import re |
| 14 import shutil | 14 import shutil |
| 15 import subprocess | 15 import subprocess |
| 16 import stat | 16 import stat |
| 17 import sys | 17 import sys |
| 18 import tarfile | 18 import tarfile |
| 19 import time | 19 import time |
| 20 import urllib2 | 20 import urllib2 |
| 21 import zipfile | 21 import zipfile |
| 22 | 22 |
| 23 # Do NOT CHANGE this if you don't know what you're doing -- see | 23 # Do NOT CHANGE this if you don't know what you're doing -- see |
| 24 # https://code.google.com/p/chromium/wiki/UpdatingClang | 24 # https://code.google.com/p/chromium/wiki/UpdatingClang |
| 25 # Reverting problematic clang rolls is safe, though. | 25 # Reverting problematic clang rolls is safe, though. |
| 26 # Note: this revision is only used for Windows. Other platforms use update.sh. | 26 # Note: this revision is only used for Windows. Other platforms use update.sh. |
| 27 # TODO(thakis): Use the same revision on Windows and non-Windows. | 27 # TODO(thakis): Use the same revision on Windows and non-Windows. |
| 28 # TODO(thakis): Remove update.sh, use update.py everywhere. | 28 # TODO(thakis): Remove update.sh, use update.py everywhere. |
| 29 LLVM_WIN_REVISION = '238562' | 29 LLVM_WIN_REVISION = '239639' |
| 30 | 30 |
| 31 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ | 31 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ |
| 32 if use_head_revision: | 32 if use_head_revision: |
| 33 LLVM_WIN_REVISION = 'HEAD' | 33 LLVM_WIN_REVISION = 'HEAD' |
| 34 | 34 |
| 35 # This is incremented when pushing a new build of Clang at the same revision. | 35 # This is incremented when pushing a new build of Clang at the same revision. |
| 36 CLANG_SUB_REVISION=1 | 36 CLANG_SUB_REVISION=1 |
| 37 | 37 |
| 38 PACKAGE_VERSION = "%s-%s" % (LLVM_WIN_REVISION, CLANG_SUB_REVISION) | 38 PACKAGE_VERSION = "%s-%s" % (LLVM_WIN_REVISION, CLANG_SUB_REVISION) |
| 39 | 39 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 # Use a real revision number rather than HEAD to make sure that the stamp | 491 # Use a real revision number rather than HEAD to make sure that the stamp |
| 492 # file logic works. | 492 # file logic works. |
| 493 LLVM_WIN_REVISION = GetSvnRevision(LLVM_REPO_URL) | 493 LLVM_WIN_REVISION = GetSvnRevision(LLVM_REPO_URL) |
| 494 PACKAGE_VERSION = LLVM_WIN_REVISION + '-0' | 494 PACKAGE_VERSION = LLVM_WIN_REVISION + '-0' |
| 495 | 495 |
| 496 return UpdateClang(args) | 496 return UpdateClang(args) |
| 497 | 497 |
| 498 | 498 |
| 499 if __name__ == '__main__': | 499 if __name__ == '__main__': |
| 500 sys.exit(main()) | 500 sys.exit(main()) |
| OLD | NEW |