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: 942861b9287cd69f7e2f2b7126dbd1b9a420d8a5
4
- data.tar.gz: 3fc6330362b2c1104ead5738cd6ae59696fc90f8
3
+ metadata.gz: 76fb956988499c9c1a2af57a8d3b38daa47a81a2
4
+ data.tar.gz: 23f64a8680c1d3f2e4d8794372d7d153b6c1c6d3
5
5
  SHA512:
6
- metadata.gz: c67721ca04e16eeff80d53b321e2355ddb0395f33b5e4e621c92b6948e43f415ae2877fb193979eb259b908216999226dd609b15595ab18f37083ca2cdaf5e9d
7
- data.tar.gz: 8fb65aa1be091d1380a6ff3088c09723834ad17f4074f8a748a2ee34348c6d4cdb3015d8c95991d6420650b4dd2785c8437b3a21755eaa2dc1bd5bb01dde0840
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 = "0"
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 = version_code.to_i + 1
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
- FastlaneCore::ConfigItem.new(key: :app_folder_name,
77
- env_name: "INCREMENTVERSIONCODE_APP_FOLDER_NAME",
78
- description: "The name of the application source folder in the Android project (default: app)",
79
- optional: true,
80
- type: String,
81
- default_value:"app")
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
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module IncrementVersionCode
3
- VERSION = "0.2.3"
3
+ VERSION = "0.3.0"
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.3
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-08-03 00:00:00.000000000 Z
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry