Skip to content

Instantly share code, notes, and snippets.

@richard-flosi
Last active July 1, 2023 21:15
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richard-flosi/8b43c06732d296f1145b8f5d12bf194e to your computer and use it in GitHub Desktop.
Save richard-flosi/8b43c06732d296f1145b8f5d12bf194e to your computer and use it in GitHub Desktop.
Netlify Build command script to deploy a Flutter Web App
#!/bin/sh
FLUTTER_BRANCH=`grep channel: .metadata | sed 's/ channel: //g'`
FLUTTER_REVISION=`grep revision: .metadata | sed 's/ revision: //g'`
git clone https://github.com/flutter/flutter.git
cd flutter
git checkout $FLUTTER_BRANCH
git pull origin $FLUTTER_BRANCH
git checkout $FLUTTER_REVISION
cd ..
flutter/bin/flutter config --enable-web
flutter/bin/flutter build web
[build]
command = "./flutter-netlify-build.sh"
publish = "build/web"
@fisforfaheem
Copy link

i tried

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment