Skip to content

Instantly share code, notes, and snippets.

@richard-flosi
Last active July 1, 2023 21:15
Show Gist options
  • 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

fisforfaheem commented Jul 1, 2023 via email

@fisforfaheem
Copy link

i tried

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