Commit 2cd0fad9 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

SuperSize: Improve deploy documentation

And have upload_html_viewer.py check that caspian files exist

Bug: None
Change-Id: I9775e5c983cbb8d4a4aa4b74037eee88dffcee99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387400
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803372}
parent d4adcb75
......@@ -10,7 +10,7 @@ Install emscripten from:
https://emscripten.org/docs/getting_started/downloads.html
```sh
git apply tools/binary_size/libsupersize/caspian/wasmbuild.patch
git apply -3 tools/binary_size/libsupersize/caspian/wasmbuild.patch
gn gen out/caspian --args='is_official_build=true treat_warnings_as_errors=false fatal_linker_warnings=false'
( cd out/caspian; autoninja tools/binary_size:caspian_web && cp wasm/caspian_web.* ../../tools/binary_size/libsupersize/static/ )
```
......@@ -22,5 +22,5 @@ tools/binary_size/supersize start_server out.size
or upload to hosted site via:
```sh
tools/binary_size/libsupersize/upload_html_viewer.py --sync
tools/binary_size/libsupersize/upload_html_viewer.py
```
......@@ -57,6 +57,8 @@ def _FirebaseDeploy(project_dir):
def _CopyStaticFiles(project_static_dir):
"""Copy over static files from the static directory."""
static_files = os.path.join(os.path.dirname(__file__), 'static')
if not os.path.exists(os.path.join(static_files, 'caspian_web.js')):
raise Exception('static/caspian_web.js is missing. See caspian/README.md')
shutil.copytree(static_files, project_static_dir)
......@@ -78,7 +80,7 @@ def _Prompt(message):
def main():
message = (
"""This script deploys the contents of //tools/binary_size/libsupersize/static
"""This script deploys the contents of //tools/binary_size/libsupersize/static
to firebase hosting at chrome-supersize.firebaseapp.com. Please ensure you have
read the instructions at //tools/binary_size/libsupersize/static/README.md first
before running this. Are you sure you want to continue?""")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment