fastlane-plugin-flutter 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20cf61e81de467591028c848f079e81b7742d954
4
- data.tar.gz: a2032215587354ca07add97cdb6712c70b53a0ac
3
+ metadata.gz: 6aac05e5f85a6ca9f1c4235db221b07b0f385e53
4
+ data.tar.gz: '068ecc8e86d8aed24453d19efaa50d65f55b3a7c'
5
5
  SHA512:
6
- metadata.gz: c5f719278a6d1374890955711bbe552ccaf165904f1c379446733e1c2960f418013696cac2004df81a4f46514b0536f8caab97a7a41e62cedbbe8ee866a9f14e
7
- data.tar.gz: cd6795bb06f0f16299fe2c0a51c45bf5ecd7823bfb827228d5da1a8c86d6b97407ac1fbd11204f1be9ca4f525b8ce3740a4c7277aa4d5ff1f8cd6cfd4842fefe
6
+ metadata.gz: 8a9ab07250b5a40522cf007c9f71c06245a50f9148780372f2bc47ba94628526931e46eda29593022687c8428ef5aa7a334d5de5b6a89859f449985f3c87d219
7
+ data.tar.gz: f0d490c621006b1815d14d71dee4c834486476aec6fb3d4d326721eb4d9e927bf40fe03e552954549ac9738bb65f2337793c5ff1b0668b65117501c7a99e393b
@@ -61,22 +61,32 @@ module Fastlane
61
61
  when 'format'
62
62
  sh *%W(flutter format #{params[:lib_path]})
63
63
  when 'l10n'
64
+ unless params[:l10n_strings_file]
65
+ UI.user_error!('l10n_strings_file is a required parameter for ' \
66
+ 'l10n action')
67
+ end
68
+
64
69
  output_dir = File.join(params[:lib_path], 'l10n')
65
70
  l10n_messages_file = File.join(output_dir, 'intl_messages.arb')
66
- l10n_messages_was = File.read(l10n_messages_file)
71
+ # This file will not exist before it's generated for the first time.
72
+ if File.exist?(l10n_messages_file)
73
+ l10n_messages_was = File.read(l10n_messages_file)
74
+ end
67
75
 
68
76
  sh *%W(flutter pub pub run intl_translation:extract_to_arb
69
77
  --output-dir=#{output_dir} #{params[:l10n_strings_file]})
70
78
 
71
- # intl will update @@last_modified even if there are no updates;
72
- # this leaves Git directory unnecessary dirty. If that's the only
73
- # change, just restore the previous contents.
74
- if Helper::FlutterHelper.restore_l10n_timestamp(
75
- l10n_messages_file, l10n_messages_was
76
- )
77
- UI.message(
78
- "@@last_modified has been restored in #{l10n_messages_file}"
79
+ if l10n_messages_was
80
+ # intl will update @@last_modified even if there are no updates;
81
+ # this leaves Git directory unnecessary dirty. If that's the only
82
+ # change, just restore the previous contents.
83
+ if Helper::FlutterHelper.restore_l10n_timestamp(
84
+ l10n_messages_file, l10n_messages_was
79
85
  )
86
+ UI.message(
87
+ "@@last_modified has been restored in #{l10n_messages_file}"
88
+ )
89
+ end
80
90
  end
81
91
 
82
92
  # Sort files for consistency, because messages_all.dart will have
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Flutter
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-flutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Sheremet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-14 00:00:00.000000000 Z
11
+ date: 2018-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -148,7 +148,7 @@ files:
148
148
  - lib/fastlane/plugin/flutter/actions/flutter_action.rb
149
149
  - lib/fastlane/plugin/flutter/helper/flutter_helper.rb
150
150
  - lib/fastlane/plugin/flutter/version.rb
151
- homepage:
151
+ homepage: https://github.com/dotdoom/fastlane-plugin-flutter
152
152
  licenses:
153
153
  - MIT
154
154
  metadata: {}