fastlane-plugin-flutter 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a45f890d9d763817a9047a2dc921f44235a5f155
4
- data.tar.gz: 75ab409fd122a2bd900b579c3c9274f6d38d69f4
3
+ metadata.gz: befee442f822fcd72b0f03757ea9dab1c6e46928
4
+ data.tar.gz: c5b82f37810c5339f365bb4e29e4eeeb9deb8e8b
5
5
  SHA512:
6
- metadata.gz: e05e2bb661a046c95a2b01da3cbddaa3803a9a60b5c57af1745fd208f6bab14ed4d301339d260ea6cc7578bebb46bf73641adaad0d43f93b96d412b9d595e088
7
- data.tar.gz: 881a172252e7f1fd261836c09df91895cb9ba886cbbedd82bf009303378df0dd01ebe55f78489c3660979446276a59f153aead352cb50aad4d0a352c4ac3ddd7
6
+ metadata.gz: 1ae9f15d861ee0ecfcf1c463479c095e0d10b879c8e895931f26c132ef75a18f498b032b00c0df226692b07d6440a11a58590dfb5fd766bf6029631393197caa
7
+ data.tar.gz: 67f0085577d0ed74738b57559c99e7a16ad392e2c5ecd2356ed43dd946d5d5daf0309558bebfc617326cd3b3606d3bd28405081640f604172360c5e5414fb2ad
@@ -40,12 +40,15 @@ module Fastlane
40
40
  # A map of fastlane platform name into "flutter build" args list.
41
41
  build_args = {}
42
42
 
43
- (lane_context[SharedValues::PLATFORM_NAME] ||
44
- # If platform is unspecified, build for all platforms.
45
- PLATFORM_TO_FLUTTER.keys).each do |fastlane_platform|
46
- build_args[fastlane_platform] = [
47
- PLATFORM_TO_FLUTTER[fastlane_platform],
48
- ]
43
+ if lane_context.key?(SharedValues::PLATFORM_NAME)
44
+ fastlane_platform = lane_context[SharedValues::PLATFORM_NAME]
45
+ build_args[fastlane_platform] =
46
+ [PLATFORM_TO_FLUTTER[fastlane_platform]]
47
+ else
48
+ # If platform is unspecified, build for all platforms.
49
+ PLATFORM_TO_FLUTTER.each_key do |platform|
50
+ build_args[platform] = [PLATFORM_TO_FLUTTER[platform]]
51
+ end
49
52
  end
50
53
 
51
54
  if params[:debug]
@@ -78,14 +81,11 @@ module Fastlane
78
81
 
79
82
  # Note: this statement is expected to return a value (map of platform
80
83
  # into file name).
81
- build_args.map do |platform, args|
84
+ Hash[build_args.keys.zip(build_args.map do |platform, args|
82
85
  sh('flutter', 'build', *args) do |status, res|
83
86
  if status.success?
84
87
  # Dirty hacks ahead!
85
- if FLUTTER_TO_OUTPUT.key?(platform)
86
- # Examples:
87
- # Built /Users/foo/src/flutter/build/output/myapp.app.
88
- # Built build/output/myapp.apk (32.4MB).
88
+ if PLATFORM_TO_OUTPUT.key?(platform)
89
89
  if res =~ /^Built (.*?)(:? \([^)]*\))?\.$/
90
90
  lane_context[PLATFORM_TO_OUTPUT[platform]] =
91
91
  File.absolute_path($1)
@@ -96,7 +96,7 @@ module Fastlane
96
96
  UI.build_failure!("flutter build #{platform} has failed.")
97
97
  end
98
98
  end
99
- end
99
+ end.compact)]
100
100
  when 'test'
101
101
  sh *%w(flutter test)
102
102
  when 'analyze'
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Flutter
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-flutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Sheremet