Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hienlt0610/c55f397255cb909a65412b78f5458ec1 to your computer and use it in GitHub Desktop.
Save hienlt0610/c55f397255cb909a65412b78f5458ec1 to your computer and use it in GitHub Desktop.

Revisions

  1. @rodydavis rodydavis revised this gist Jun 17, 2020. No changes.
  2. @rodydavis rodydavis created this gist Jun 17, 2020.
    70 changes: 70 additions & 0 deletions flutter_all_fastlane.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    # This file contains the fastlane.tools configuration
    # You can find the documentation at https://docs.fastlane.tools
    #
    # For a list of all available actions, check out
    #
    # https://docs.fastlane.tools/actions
    #
    # For a list of all available plugins, check out
    #
    # https://docs.fastlane.tools/plugins/available-plugins
    #

    # Uncomment the line if you want fastlane to automatically update itself
    # update_fastlane

    default_platform(:ios)

    platform :ios do
    desc "Runs all the tests"
    lane :test do
    sh "flutter test"
    end

    desc "Deploy Beta Build"
    lane :beta do
    puts "Deploying Mac App"
    sh "flutter build macos --profile --no-tree-shake-icons"
    Dir.chdir("../macos") do
    sh "fastlane beta"
    end

    puts "Deploying iPad App"
    sh "flutter build ios --profile --no-tree-shake-icons"
    Dir.chdir("../ios") do
    sh "fastlane beta"
    end

    puts "Deploying Android App"
    sh "flutter build appbundle --profile --no-tree-shake-icons"
    Dir.chdir("../android") do
    sh "fastlane beta"
    end
    end

    desc "Deploy Release Build"
    lane :release do
    puts "Deploying Web App"
    sh "flutter pub global run peanut --canvas-kit --no-release"
    sh "git push origin --set-upstream gh-pages"

    puts "Deploying MacOS App"
    sh "flutter build macos --profile --no-tree-shake-icons"
    Dir.chdir("../macos") do
    sh "fastlane release"
    end

    puts "Deploying iPad App"
    sh "flutter build ios --profile --no-tree-shake-icons"
    Dir.chdir("../ios") do
    sh "fastlane release"
    end

    puts "Deploying Android App"
    sh "flutter build appbundle --profile --no-tree-shake-icons"
    Dir.chdir("../android") do
    sh "fastlane release"
    end
    end
    end