Skip to content

Commit e0c976f

Browse files
Ross Hambricksethladd
Ross Hambrick
authored andcommitted
skipping pub build if web directory not present (#41)
1 parent b24bc6d commit e0c976f

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

bin/compile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,19 @@ for filename in `find . -name pubspec.yaml | grep -v dart-sdk | grep -v pub-cach
100100
#start pub from the /app folder to have correct symlink paths
101101
/app/dart-sdk/bin/pub get
102102

103-
message "*** Running pub build"
104-
105-
if [[ -z "$DART_BUILD_CMD" ]]
103+
if [ -d "web" ]
106104
then
107-
message 'Building with "pub build"'
108-
/app/dart-sdk/bin/pub build
105+
message "*** Running pub build"
106+
if [[ -z "$DART_BUILD_CMD" ]]
107+
then
108+
message 'Building with "pub build"'
109+
/app/dart-sdk/bin/pub build
110+
else
111+
message "Building with \"$DART_BUILD_CMD\""
112+
eval $DART_BUILD_CMD
113+
fi
109114
else
110-
message "Building with \"$DART_BUILD_CMD\""
111-
eval $DART_BUILD_CMD
115+
message '*** Skipping pub build because "web" folder not found'
112116
fi
113117

114118
done

0 commit comments

Comments
 (0)