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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 523f48a1c54ccb8078a25832558b8c1c79a53400
|
4
|
+
data.tar.gz: 2318cfa10c0f2aa45e2f3031ce6f698792f453b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Jems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|