fastlane-plugin-increment_version_code 0.2.3 → 0.3.0
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: 76fb956988499c9c1a2af57a8d3b38daa47a81a2
|
4
|
+
data.tar.gz: 23f64a8680c1d3f2e4d8794372d7d153b6c1c6d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995c163cc39606eb6a020f87f5c6d92c7680afb70d7fcd8a19e91eefe6905ace9efb55ff4407c4ebfda5db250d897c183317ea5efdb37097a545dbf8a18622ba
|
7
|
+
data.tar.gz: 123c3c8c9ef6ddbf9b0646a2a600d16d061530109f422dedd12820e0af42fc3844ac7144e979184ed15bb680304557cec8c43adf2e327689054d206bdec2e6b5
|
@@ -9,7 +9,8 @@ module Fastlane
|
|
9
9
|
UI.message("The get_version_code plugin is looking inside your project folder (#{app_folder_name})!")
|
10
10
|
|
11
11
|
version_code = "0"
|
12
|
-
new_version_code
|
12
|
+
new_version_code ||= params[:version_code]
|
13
|
+
UI.message("new version code = #{new_version_code}")
|
13
14
|
|
14
15
|
temp_file = Tempfile.new('fastlaneIncrementVersionCode')
|
15
16
|
foundVersionCode = "false"
|
@@ -23,7 +24,9 @@ module Fastlane
|
|
23
24
|
|
24
25
|
versionComponents = line.strip.split(' ')
|
25
26
|
version_code = versionComponents[1].tr("\"","")
|
26
|
-
new_version_code
|
27
|
+
if new_version_code <= 0
|
28
|
+
new_version_code = version_code.to_i + 1
|
29
|
+
end
|
27
30
|
if !!(version_code =~ /\A[-+]?[0-9]+\z/)
|
28
31
|
line.replace line.sub(version_code, new_version_code.to_s)
|
29
32
|
foundVersionCode = "true"
|
@@ -73,12 +76,18 @@ module Fastlane
|
|
73
76
|
|
74
77
|
def self.available_options
|
75
78
|
[
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
FastlaneCore::ConfigItem.new(key: :app_folder_name,
|
80
|
+
env_name: "INCREMENTVERSIONCODE_APP_FOLDER_NAME",
|
81
|
+
description: "The name of the application source folder in the Android project (default: app)",
|
82
|
+
optional: true,
|
83
|
+
type: String,
|
84
|
+
default_value:"app"),
|
85
|
+
FastlaneCore::ConfigItem.new(key: :version_code,
|
86
|
+
env_name: "INCREMENTVERSIONCODE_VERSION_CODE",
|
87
|
+
description: "Change to a specific version (optional)",
|
88
|
+
optional: true,
|
89
|
+
type: Integer,
|
90
|
+
default_value: 0)
|
82
91
|
]
|
83
92
|
end
|
84
93
|
|
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.
|
4
|
+
version: 0.3.0
|
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-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|