From e3770bfc196b6dbb4c2ea542917edac12c0eb97a Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Fri, 20 Mar 2015 11:21:47 -0700 Subject: [PATCH] Fix deploy_sdk.py to error out if files are missing I also now deploy sky/bin/sky as sky/lib/sky_tool since pub run doesn't really work very well yet. R=abarth@chromium.org BUG= Review URL: https://codereview.chromium.org/1026863002 --- engine/src/flutter/tools/deploy_sdk.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/tools/deploy_sdk.py b/engine/src/flutter/tools/deploy_sdk.py index f729e9ddb0..6ba476b4c7 100755 --- a/engine/src/flutter/tools/deploy_sdk.py +++ b/engine/src/flutter/tools/deploy_sdk.py @@ -55,6 +55,7 @@ def ensure_dir_exists(path): def copy(from_root, to_root, filter_func=None): + assert os.path.exists(from_root), "%s does not exist!" % from_root if os.path.isfile(from_root): ensure_dir_exists(os.path.dirname(to_root)) shutil.copy(from_root, to_root) @@ -166,6 +167,10 @@ def main(): copy(os.path.join(build_dir, 'gen/sky'), sdk_path('packages/sky/lib'), gen_filter) + # Work around the fact that pub run doesn't work well right now. + copy(src_path('sky/sdk/packages/sky/bin/sky'), + sdk_path('packages/sky/lib/sky_tool')) + # Sky SDK additions: copy_or_link(src_path('sky/engine/bindings/builtin.dart'), sdk_path('packages/sky/sdk_additions/dart_sky_builtins.dart')) @@ -173,6 +178,7 @@ def main(): copy_or_link(os.path.join(bindings_path, 'dart_sky.dart'), sdk_path('packages/sky/sdk_additions/dart_sky.dart')) + # Mojo package, lots of overlap with gen, must be copied: copy(src_path('mojo/public'), sdk_path('packages/mojo/lib/public'), dart_filter) @@ -182,7 +188,7 @@ def main(): # Mojo SDK additions: copy_or_link(src_path('mojo/public/dart/bindings.dart'), sdk_path('packages/mojo/sdk_additions/dart_mojo_bindings.dart')) - copy_or_link(src_path('mojo/public/dart/dart_mojo_core.dart'), + copy_or_link(src_path('mojo/public/dart/core.dart'), sdk_path('packages/mojo/sdk_additions/dart_mojo_core.dart')) if not skip_apks: