Download Flutter beta channel and start a build for web
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # Begin to build Flutter app for prod | |
| # Get location that the script is being ran from | |
| APP_DIR="$( | |
| cd -P "$(dirname "${BASH_SOURCE[0]}")" | |
| pwd | |
| )" | |
| FLUTTER_DIR="${APP_DIR}/flutter" | |
| FLUTTER_BIN="${FLUTTER_DIR}/bin/flutter" | |
| echo "π Building inside of: \n "$APP_DIR | |
| if cd $FLUTTER_DIR; then | |
| echo "π¦ Cahed version of Flutter Beta found!" | |
| echo "π Checking for updates..." | |
| git pull --ff-only && cd .. | |
| else | |
| echo "π¦ Download and setup Flutter Beta" | |
| git clone https://github.com/flutter/flutter.git | |
| echo "π§ͺ Checking out beta release for web utils" | |
| $FLUTTER_BIN channel beta | |
| $FLUTTER_BIN upgrade | |
| echo "β π§ͺ Beta version of Flutter installed!" | |
| fi | |
| # Prevent build errors if the folder isnβt present. | |
| mkdir -p $APP_DIR/build/web/assets | |
| echo "π Building Flutter app for web" | |
| $FLUTTER_BIN config --enable-web | |
| $FLUTTER_BIN build web --release |