fastlane-plugin-flutter 0.2.4 → 0.2.5

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: 3285411bae73b95137074776448187327f176908
4
- data.tar.gz: ea813359aba6ea098d16aff0483e1c75c2617dbc
3
+ metadata.gz: 47d53bc585a939cb6dc95ab9b5772b209e94fbdc
4
+ data.tar.gz: ebb83498b3c1ca6ab2b24d6d599669425080bea3
5
5
  SHA512:
6
- metadata.gz: ce2458bb2d0243aefe7779e0e56483721773de4c19a89893ce14d845b635791b8a8e988cef934f398a8a7a4e13693d7f53a7039a1d65afbb8879faf84762633b
7
- data.tar.gz: b67967887ab9bd14b65b9eb0a02b8f12f334406b8163b30d7ab593e6dbca04c9274b8bd77ea7a26cfaf3af454324646a1b5cd1c541d54abb8e62d282db65197f
6
+ metadata.gz: f27e2b916851836e9d94e4110a8e833a938c3e95a548998191e7a9eba97ba98d7e3468d7a12c0185a06b3ee254584e23d59448724b5dc5ac7e1273754a79b0ca
7
+ data.tar.gz: 5683a49532741a8511130f9fed57b7090af7a197464e92fb9a6f31c531b127a4d34c24a9ef55a79f54905ce84986ca9ef24aaa3f61ffd7f2cd506d624de13f3c
@@ -250,9 +250,11 @@ module Fastlane
250
250
  description: <<-'DESCRIPTION',
251
251
  Override build name in pubspec.yaml. Can be either a string, or a
252
252
  schema definition, ex.: vcs* (take from VCS, add "*" for dirty
253
- tree), vcs (take from VCS, no dirty mark).
254
- NOTE: for App Store, must be in the format of at most 3 integeres
255
- separated by a dot (".").
253
+ tree), vcs (take from VCS, no dirty mark), ^vcs (take from the
254
+ latest VCS tag which must be in the form X.Y, and add the number
255
+ of commits since that tag as the third number, unless it's zero).
256
+ NOTE: for App Store, build name must be in the format of at most 3
257
+ integeres separated by a dot (".").
256
258
  DESCRIPTION
257
259
  optional: true,
258
260
  verify_block: Helper::FlutterHelper.method(:build_name),
@@ -88,9 +88,30 @@ module Fastlane
88
88
  end
89
89
 
90
90
  def self.build_name(schema)
91
- if schema && schema.start_with?('vcs')
92
- dirty_mark = schema['vcs'.size..-1]
93
- Actions.sh(*%W(git describe --tags --dirty=#{dirty_mark})).strip
91
+ if schema && schema =~ /^(\^)?vcs(.*)$/
92
+ schema_caret = $1
93
+ schema_dirty_mark = $2
94
+ vcs_version = Actions.sh(
95
+ *%W(git describe --tags --dirty=#{schema_dirty_mark})
96
+ ).strip
97
+
98
+ # We try to match, otherwise assume vcs_version = $TAG, which means
99
+ # that there are 0 commits since the latest tag.
100
+ if schema_caret && vcs_version =~ /^
101
+ (\d+[.]\d+)-
102
+ (\d+)-
103
+ g.*?
104
+ (#{Regexp.quote(schema_dirty_mark)})?
105
+ $/x
106
+
107
+ vcs_version = "#{$1}.#{$2}"
108
+ # Making the best guess whether it's dirty.
109
+ if $3
110
+ vcs_version += schema_dirty_mark
111
+ end
112
+ end
113
+
114
+ vcs_version
94
115
  else
95
116
  schema
96
117
  end
@@ -127,7 +148,7 @@ module Fastlane
127
148
  end
128
149
  end
129
150
 
130
- download_android_dependencies
151
+ Dir.chdir('android') { Actions.sh('./gradlew', 'dependencies') }
131
152
  end
132
153
 
133
154
  def self.android_sdk_root!
@@ -139,35 +160,6 @@ module Fastlane
139
160
  end
140
161
  end
141
162
 
142
- def self.download_android_dependencies
143
- Tempfile.create('resolveDependencies.gradle') do |init_script|
144
- init_script.puts(<<-GRADLE)
145
- allprojects {
146
- task resolveDependencies {
147
- doLast {
148
- project.configurations.each { configuration ->
149
- if (configuration.isCanBeResolved()) {
150
- configuration.resolve()
151
- }
152
- }
153
- project.buildscript.configurations.each { configuration ->
154
- if (configuration.isCanBeResolved()) {
155
- configuration.resolve()
156
- }
157
- }
158
- }
159
- }
160
- }
161
- GRADLE
162
- init_script.flush
163
-
164
- Dir.chdir('android') do
165
- Actions.sh('./gradlew', '--init-script', init_script.path,
166
- '--', ':resolveDependencies')
167
- end
168
- end
169
- end
170
-
171
163
  # https://stackoverflow.com/a/5471032/8584735
172
164
  def self.which(cmd)
173
165
  exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Flutter
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.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.2.4
4
+ version: 0.2.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: 2019-02-17 00:00:00.000000000 Z
11
+ date: 2019-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry