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

Unified Diff: runtime/observatory/maintainers/snapshot_dependencies.sh

Issue 810623005: Build Observatory with runtime (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « runtime/observatory/maintainers/pubspec.template ('k') | runtime/observatory/observatory.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/maintainers/snapshot_dependencies.sh
diff --git a/runtime/observatory/maintainers/snapshot_dependencies.sh b/runtime/observatory/maintainers/snapshot_dependencies.sh
new file mode 100755
index 0000000000000000000000000000000000000000..cd13564e577631e32a73c543149026c95197add2
--- /dev/null
+++ b/runtime/observatory/maintainers/snapshot_dependencies.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# This script will create a deep snapshot of all Observatory package
+# dependencies. The output will be in observatory_pub_packages which
+# then should be committed to third_party/observatory_pub_packages.
+
+
+PUBSPEC_INPUT="pubspec.template"
+PUBSPEC_OUTPUT="pubspec.yaml"
+PACKAGES_INPUT="packages"
+PACKAGES_OUTPUT="observatory_pub_packages"
+
+if [ ! -d "../maintainers" ]; then
+ echo "Please run this script from the maintainers directory"
+ exit
+fi
+
+if [ ! -f $PUBSPEC_INPUT ]; then
+ echo "Cannot find $PUBSPEC_INPUT"
+ exit
+fi
+
+# Cleanup leftovers
+rm -f $PUBSPEC_OUTPUT
+rm -rf $PACKAGES_INPUT
+rm -rf $PACKAGES_OUTPUT
+
+# Setup for pub get run
+cp $PUBSPEC_INPUT $PUBSPEC_OUTPUT
+
+# Run pub get
+pub get
+
+# Prepare for output
+mkdir $PACKAGES_OUTPUT
+
+OUTPUT_BASE=`realpath $PACKAGES_OUTPUT`
+# Copy necessary files
+pushd $PACKAGES_INPUT > /dev/null
+for i in *; do
+ ACTUAL_PATH=`realpath $i`
+ mkdir $OUTPUT_BASE/$i
+ mkdir $OUTPUT_BASE/$i/lib
+ cp $ACTUAL_PATH/../pubspec.yaml $OUTPUT_BASE/$i/pubspec.yaml
+ rsync -Lr $ACTUAL_PATH/* $OUTPUT_BASE/$i/lib
+done
+popd > /dev/null
+
+echo '***'
+echo 'Dumping package dependencies:':
+echo ''
+echo 'dependency_overrides:'
+pushd $PACKAGES_OUTPUT > /dev/null
+for i in *; do
+ echo -e " $i:\n path: ../../third_party/$PACKAGES_OUTPUT/$i"
+done
+popd > /dev/null
+echo ''
+echo '***'
+echo -n 'Now run: rsync -a --delete observatory_pub_packages/ '
+echo '~/workspace/dart-third_party/observatory_pub_packages/'
+echo '***'
« no previous file with comments | « runtime/observatory/maintainers/pubspec.template ('k') | runtime/observatory/observatory.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698