Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Unified Diff: runtime/bin/vmservice/client/precommit.sh

Issue 148153007: Add Google Charts to Observatory and use it in allocation profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/vmservice/client/precommit.sh
diff --git a/runtime/bin/vmservice/client/precommit.sh b/runtime/bin/vmservice/client/precommit.sh
index b923d9f5eb0534e3622287babbb3fffc1aa81e3f..13325b290283a90f1341654f7d672891996a077f 100755
--- a/runtime/bin/vmservice/client/precommit.sh
+++ b/runtime/bin/vmservice/client/precommit.sh
@@ -23,12 +23,12 @@ DEPLOYED="deployed/web"
INPUT="$BASE/$SHADOW_DOM"
INPUT="$INPUT $BASE/$CUSTOM_ELEMENTS"
INPUT="$INPUT $BASE/$INTEROP"
-INPUT="$INPUT $BASE/$OBSERVATORY"
-OUTPUT="$DEPLOYED/index.html_bootstrap.dart.js"
+INPUT_STANDALONE="$INPUT $BASE/$OBSERVATORY"
+OUTPUT_STANDALONE="$DEPLOYED/index.html_bootstrap.dart.js"
# Rolling
-cat $INPUT > $OUTPUT
+cat $INPUT_STANDALONE > $OUTPUT_STANDALONE
cp $BASE/index.html $DEPLOYED/index.html
INPUT_DEVTOOLS="$INPUT $BASE/$OBSERVATORY_DEVTOOLS"
@@ -36,3 +36,19 @@ OUTPUT_DEVTOOLS="$DEPLOYED/index_devtools.html_bootstrap.dart.js"
cat $INPUT_DEVTOOLS > $OUTPUT_DEVTOOLS
cp $BASE/index_devtools.html $DEPLOYED/index_devtools.html
+
+# Kill package <script> tags added by polymer compilation.
+# This kills harmless (but distracting) Chrome Developer Console spam
+# about missing scripts.
+perl -pi -e 's/<script src="packages.*"><\/script>//g' \
+ $DEPLOYED/index.html
+perl -pi -e 's/<script src="packages.*"><\/script>//g' \
+ $DEPLOYED/index_devtools.html
+
+# The polymer compilation step munges <img> src urls and adds a packages/
+# prefix to the url. Because of how we deploy we must undo this and remove
+# the prefix. Without this, images will show up as broken links.
+perl -pi -e 's/packages\/observatory\/src\/observatory_elements\///g' \
+ $DEPLOYED/index.html
+perl -pi -e 's/packages\/observatory\/src\/observatory_elements\///g' \
+ $DEPLOYED/index_devtools.html

Powered by Google App Engine
This is Rietveld 408576698