Sha256: 033331e4e0bc072f81dfa47d084f203ed8286dae2f3d138d544b2dfed919d800

Contents?: true

Size: 1.3 KB

Versions: 18

Compression:

Stored size: 1.3 KB

Contents

def update_flutter_app_debug(path, url, ref)
    if !File.exist?(path)
       `git clone #{url} #{path}`
       `cd #{path} && git fetch --all -v && \
       git reset --hard origin/master && \
       git pull && \
       git checkout #{ref} && \
       cd #{path} && \
       sh build_ios.sh -m release`
    end
    puts "Flutter project is already existed, remove '.flutter' folder and `pod install` again the flutter project will be rebuilded with new code."
end

def install_debug_flutter_app(url, ref)

    puts "Compiling☕️️️️️☕️☕️\n"

    flutter_application_path = __dir__ + "/.flutter"
    flutter_application_url = ""
    flutter_application_branch = 'master'

    if url != nil
        flutter_application_url = url
        if ref != nil
            flutter_application_branch = ref
        end
    else
        raise "Error: 请在'Podfile'里增加Flutter App git地址配置,配置格式请查看'flutterhelper.rb'文件"
    end

    update_flutter_app_debug(flutter_application_path, flutter_application_url, flutter_application_branch)

    if $?.to_i == 0

        flutter_package_path = "#{flutter_application_path}/.build_ios/product"
        # 开始安装
        install_release_flutter_app_pod(flutter_package_path)
    else
        raise "Error: 编译 Flutter App失败"
    end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cocoapods-flutter-dt-0.4.3 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.4.2 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.4.1 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.7 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.6 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.5 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.4 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.3 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.2 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.1 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.2.0 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.1.0 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.0.9 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.0.8 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.0.7 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.0.6 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.0.4 lib/cocoapods-flutter/native/flutterhelper.rb
cocoapods-flutter-dt-0.0.3 lib/cocoapods-flutter/native/flutterhelper.rb