fastlane-plugin-increment_version_code 0.2.0 → 0.2.1

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: 0d8184b8046639011e78bf1d48ea93beb4680403
4
- data.tar.gz: 8838aa61c22ca39a7233806ccb765ad1b46271d3
3
+ metadata.gz: 523f48a1c54ccb8078a25832558b8c1c79a53400
4
+ data.tar.gz: 2318cfa10c0f2aa45e2f3031ce6f698792f453b7
5
5
  SHA512:
6
- metadata.gz: 0e85bc50ff3b8f4053af76d6b136161e7432fe3440a66db1d5f764418c02a0619277636b33a463393c3759a7cf7af8889f6b7d3ec43e5b9fbf0a044ed0c27eef
7
- data.tar.gz: d46612051db020ca21027a5a241a2e2d1eb3243227a887d0e8c30802f7f76778f367ccb0d895e061afa3e6fa64f01c52b751dba55d6720c68dd11fa26cdb613d
6
+ metadata.gz: 681de903b8008f80433e851982fff1f9c542b220765a8d3544418591293c2ad99071b0d942539d3f7ac08415aa1cea35c7c2ade4bff9c94cbaf3c25af982c2af
7
+ data.tar.gz: 8c50f20d3437f14841a258d249c08d960159ccfc4693e4ba797539e75f543ec7facc9279a6eed33c47f1c53b304720876958523073540ba1838c33f7aba91c5a
@@ -12,22 +12,29 @@ module Fastlane
12
12
  new_version_code = "0"
13
13
 
14
14
  temp_file = Tempfile.new('fastlaneIncrementVersionCode')
15
+ foundVersionCode = "false"
15
16
  Dir.glob("../**/#{app_folder_name}/build.gradle") do |path|
16
17
  begin
17
18
  File.open(path, 'r') do |file|
18
19
  file.each_line do |line|
19
- if line.include? "versionCode"
20
+ if line.include? "versionCode " and foundVersionCode=="false"
20
21
  versionComponents = line.strip.split(' ')
21
22
  version_code = versionComponents[1].tr("\"","")
22
23
  new_version_code = version_code.to_i + 1
23
- line.replace line.sub(version_code, new_version_code.to_s)
24
+ if version_code.is_a? Integer
25
+ line.replace line.sub(version_code, new_version_code.to_s)
26
+ foundVersionCode = "true"
27
+ end
24
28
  temp_file.puts line
25
29
  else
26
30
  temp_file.puts line
27
31
  end
28
32
  end
33
+ file.close
34
+ if foundVersionCode=="true"
35
+ break
36
+ end
29
37
  end
30
- temp_file.close
31
38
  FileUtils.mv(temp_file.path, path)
32
39
  ensure
33
40
  temp_file.close
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module IncrementVersionCode
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-increment_version_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
- - Jérémy TOUDIC
7
+ - Jems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 2016-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry