@@ -18,20 +18,11 @@ lane :update do
1818 update_analysis_options
1919 Dir . chdir ( '..' ) do
2020 Dir . chdir ( 'flutter' ) do
21- # This will automatically upgrade flutter, if necessary. It won't run
22- # "flutter update-packages", but we don't need it.
23- flutter_root = flutter_bootstrap ( flutter_channel : 'stable' )
24-
25- # Copy over .gitignore from official templates.
26- FileUtils . cp (
27- File . join (
28- flutter_root ,
29- 'packages/flutter_tools/templates/app/.gitignore.tmpl' ,
30- ) ,
31- '.gitignore' ,
32- )
33-
3421 Dir . chdir ( 'fastlane' ) do
22+ # This will automatically upgrade flutter, if necessary. It won't run
23+ # "flutter update-packages", but we don't need it.
24+ flutter_bootstrap ( flutter_channel : 'stable' )
25+
3526 # Upgrade current application packages (within pubspec.yaml spec).
3627 flutter ( args : %w( packages upgrade ) )
3728 end
@@ -44,7 +35,9 @@ lane :update do
4435 if RUBY_PLATFORM . include? 'darwin'
4536 # These files will be automatically re-generated by the build.
4637 podfile_path = 'ios/Podfile'
47- File . delete ( podfile_path , "#{ podfile_path } .lock" )
38+ [ podfile_path , "#{ podfile_path } .lock" ] . each do |fn |
39+ File . delete ( fn ) if File . exist? ( fn )
40+ end
4841 Dir . chdir ( 'fastlane' ) do
4942 flutter_build (
5043 build : 'ios' ,
136129
137130 project_id = "#{ product } -debug-#{ _github_fork_name ( ) } "
138131 sh %w( npm install )
139- Dir . chdir ( 'functions' ) { sh %w( npm install ) }
132+ if File . directory? ( 'functions' )
133+ Dir . chdir ( 'functions' ) { sh %w( npm install ) }
134+ end
140135 fastlane_require 'shellwords'
141136 # Give Firebase login interactive mode and do not crop lines.
142137 exec %W( npm start -- #{ project_id } ) . shelljoin
0 commit comments