Revert "Copy entire api-docs directory to release GCloud directory in promote script."

This reverts commit f03279a7eb.
When there is only one file in the directory, this does not move the
file into the target directory, but moves it to replace the target
directory with a file.

Reverting to the old behavior, with a changed filename, since we are
now only copying one file. tools/bots/bot_utils.py:124 is changed to
use dartdocs_zipfilename() instead of the deleted apidocs_zipfilename().

BUG=https://github.com/dart-lang/www.dartlang.org/issues/1528
R=ricow@google.com

Review URL: https://codereview.chromium.org/1502253002 .
This commit is contained in:
William Hesse 2015-12-09 10:29:34 +01:00
parent 0413883e0c
commit ed9bb160de
2 changed files with 9 additions and 9 deletions

View file

@ -71,7 +71,7 @@ class GCSNamer(object):
Under every base path, the following structure is used:
- /VERSION
- /api-docs/{dart-api-docs.zip,dartdocs-gen-api.zip}
- /api-docs/dartdocs-gen-api.zip
- /dartium/{chromedriver,content_shell,dartium}
-{linux,macos,windows}-{ia32,x64}-release.zip
- /sdk/dartsdk-{linux,macos,windows}-{ia32,x64}-release.zip
@ -119,6 +119,10 @@ class GCSNamer(object):
return '/'.join([self.dartium_directory(revision),
self.dartium_variant_zipfilename(name, system, arch, mode)])
def apidocs_zipfilepath(self, revision):
return '/'.join([self.apidocs_directory(revision),
self.dartdocs_zipfilename()])
def dartium_android_apk_filepath(self, revision, name, arch, mode):
return '/'.join([self.dartium_android_directory(revision),
self.dartium_android_apk_filename(name, arch, mode)])
@ -162,9 +166,6 @@ class GCSNamer(object):
def dartium_android_apk_filename(self, name, arch, mode):
return '%s-%s-%s.apk' % (name, arch, mode)
def apidocs_zipfilename(self):
return 'dart-api-docs.zip'
def dartdocs_zipfilename(self):
return 'dartdocs-gen-api.zip'

View file

@ -131,11 +131,10 @@ def _PromoteDartArchiveBuild(channel, revision):
remove_gs_directory(to_loc)
Gsutil(['-m', 'cp', '-a', 'public-read', '-R', from_loc, to_loc])
# Copy api-docs directory.
from_loc = raw_namer.apidocs_directory(revision)
to_loc = release_namer.apidocs_directory(to_revision)
remove_gs_directory(to_loc)
Gsutil(['-m', 'cp', '-a', 'public-read', '-R', from_loc, to_loc])
# Copy api-docs zipfile.
from_loc = raw_namer.apidocs_zipfilepath(revision)
to_loc = release_namer.apidocs_zipfilepath(to_revision)
Gsutil(['-m', 'cp', '-a', 'public-read', from_loc, to_loc])
# Copy dartium directory.
from_loc = raw_namer.dartium_directory(revision)