Build the latest release of Chrome 28

VERSION now specifies a Chrome release instead of a Chromium trunk
revision. script/update now generates vendor/chromium/.gclient on demand
based on the specified release.

By building Chrome releases we can hopefully avoid bugs that Google
never ships to customers, at the expense of some modernity.
This commit is contained in:
Adam Roben 2013-07-01 17:00:38 -04:00
Родитель 0f470d6130
Коммит 8a9237f51b
5 изменённых файлов: 22 добавлений и 13 удалений

Просмотреть файл

@ -24,7 +24,7 @@ TODO
### Updating project files
If you change `VERSION` to point to a different Chromium revision, or modify
If you change `VERSION` to point to a different Chromium release, or modify
`chromiumcontent.gyp{,i}`, you should run:
$ script/update

Просмотреть файл

@ -1 +1 @@
CHROMIUM_REVISION=202921
28.0.1500.63

Просмотреть файл

@ -29,6 +29,7 @@ def main():
p.communicate()
return p.returncode
write_dot_gclient()
gclient_sync()
install_win_toolchain()
import_win_environment()
@ -38,12 +39,26 @@ def main():
install_win_tool_wrapper()
def write_dot_gclient():
template = os.path.join(CHROMIUM_DIR, '.gclient.in')
destination = os.path.join(CHROMIUM_DIR, '.gclient')
version = chromium_version()
with open(template) as t:
with open(destination, 'w') as d:
for line in t:
d.write(line.replace('{{VERSION}}', version))
def chromium_version():
with open(os.path.join(SOURCE_ROOT, 'VERSION')) as f:
return f.readline().strip()
def gclient_sync():
ensure_nacl_disabled()
gclient = os.path.join(DEPOT_TOOLS_DIR, 'gclient.py')
os.chdir(CHROMIUM_DIR)
subprocess.check_call([sys.executable, gclient, 'sync', '--revision',
'src@{0}'.format(chromium_revision())])
subprocess.check_call([sys.executable, gclient, 'sync'])
def ensure_nacl_disabled():
@ -54,13 +69,6 @@ def ensure_nacl_disabled():
os.environ['GYP_DEFINES'] = ' '.join(['disable_nacl=1', os.environ.get('GYP_DEFINES', '')])
def chromium_revision():
with open(os.path.join(SOURCE_ROOT, 'VERSION'), 'r') as f:
[key, value] = f.readline().strip().split('=')
assert key == 'CHROMIUM_REVISION'
return value
def install_win_toolchain():
if sys.platform != 'win32':
return

Просмотреть файл

@ -5,8 +5,8 @@
# specify custom dependencies (via the "custom_deps" property) that
# override or augment the dependencies specified by the DEPS file.
solutions = [
{ "name" : "src",
"url" : "http://src.chromium.org/svn/trunk/src",
{ "name" : "{{VERSION}}",
"url" : "http://src.chromium.org/chrome/releases/{{VERSION}}",
"custom_deps" : {
# To use the trunk of a component instead of what's in DEPS:
#"component": "https://svnserver/component/trunk/",

1
vendor/chromium/.gitignore поставляемый
Просмотреть файл

@ -1,2 +1,3 @@
/src/
/.gclient
/.gclient_entries