Skip to content

Loading…

Install all pubspec.yaml dependencies #9

Merged
merged 1 commit into from

2 participants

@eee-c

Not just those in the root directory of the application. Also,
manually fix the symlink in any web sub-directories.

This accounts for the case in which the application has Dart
client code in addition to server code.

@eee-c eee-c Install all pubspec.yaml dependencies
Not just those in the root directory of the application. Also,
manually fix the symlink in any web sub-directories.
9baa918
@igrigorik igrigorik merged commit 14f0de0 into igrigorik:master
@igrigorik
Owner

Nice, thanks Chris.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 2, 2012
  1. @eee-c

    Install all pubspec.yaml dependencies

    eee-c committed
    Not just those in the root directory of the application. Also,
    manually fix the symlink in any web sub-directories.
Showing with 14 additions and 4 deletions.
  1. +14 −4 bin/compile
View
18 bin/compile
@@ -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
-
-
Something went wrong with that request. Please try again.