Install all pubspec.yaml dependencies #9

Merged
merged 1 commit into from Dec 2, 2012
Jump to file or symbol
Failed to load files and symbols.
+14 −4
Split
View
@@ -53,11 +53,21 @@ message "-----> Install packages"
cd $BUILD_DIR
-#start pub from the /app folder to have correct symlink paths
-/app/dart-sdk/bin/pub install
+for filename in `find . -name pubspec.yaml | grep -v dart-sdk | grep -v pub-cache`; do
+ pub_dir=`dirname $filename`
+ message "*** Found pubspec.yaml in $pub_dir"
+ cd $BUILD_DIR/$pub_dir
+
+ #start pub from the /app folder to have correct symlink paths
+ /app/dart-sdk/bin/pub install
+
+ if [ -e $BUILD_DIR/$pub_dir/web/packages ]; then
+ cd $BUILD_DIR/$pub_dir/web
+ ln -sf ../packages
+ message "Fixed web symlink"
+ fi
+done
# move packages from cache directory into build directory
cd $CACHE_DIR
cp -r $CACHE_DIR/pub-cache $BUILD_DIR/$PACKAGES_DIR
-
-