fastlane-plugin-android_versioning 0.4.0 → 0.5.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: d69aa075985bc7879e590de538aef6063ba89cc5
4
- data.tar.gz: 45154aef31fc58000c3a6da179aabe80b50565b4
3
+ metadata.gz: 5c15697ef9a7304587fb5cbdbf519012d6cceb0d
4
+ data.tar.gz: f7ac71706010a1df57618e567bf7899b10b938ce
5
5
  SHA512:
6
- metadata.gz: f7b510ff63b91377749d67e85e99b7e12db28320a95329006b7fcc7e9d71af3b8303c4ac07b3de17a530c71a51ff67ee3533464415f9e682d9dc21bbc53e86ed
7
- data.tar.gz: 76cb8de30f33c41ba9a90fc06233315b7b1c00f7c36ee8707c085c7ed7f1db2289a3a6602b905927d235b070dfd5ae8bc127a52bd33ad2e19cd46548b7476240
6
+ metadata.gz: ce8936e9d2c2db095bc2a1986de3e73c3973800e63d64453220cd03e59e48b5276668ffb12bbc763a5dd52ef994b3ef97733bb89364a07e719a8df9603ff745a
7
+ data.tar.gz: 2006d4219e8775f5010fcf642a0ece4787965569283439bfe6c3c5050aa5fda263ceb4db13f3d7dfcbd34c8da397c0d1ca96926381ac849af42dd06b86c6195d
@@ -9,7 +9,16 @@ module Fastlane
9
9
  class IncrementVersionCodeAction < Action
10
10
  def self.run(params)
11
11
  current_version_code = GetVersionCodeAction.run(params)
12
- new_version_code = params[:version_code].nil? ? current_version_code.to_i + 1 : params[:version_code].to_i
12
+
13
+ new_version_code =
14
+ if params[:version_code].nil?
15
+ current_version_code.to_i + 1
16
+ elsif params[:version_code] == -1
17
+ ((Time.now.to_f * 1000).to_i / (60 * 1000)).to_i
18
+ else
19
+ params[:version_code].to_i
20
+ end
21
+
13
22
  SetValueInBuildAction.run(
14
23
  app_project_dir: params[:app_project_dir],
15
24
  key: "versionCode",
@@ -24,17 +33,17 @@ module Fastlane
24
33
  #####################################################
25
34
  def self.available_options
26
35
  [
27
- FastlaneCore::ConfigItem.new(key: :app_project_dir,
28
- env_name: "ANDROID_VERSIONING_APP_PROJECT_DIR",
29
- description: "The path to the application source folder in the Android project (default: android/app)",
30
- optional: true,
31
- type: String,
32
- default_value: "android/app"),
33
- FastlaneCore::ConfigItem.new(key: :version_code,
34
- env_name: "ANDROID_VERSIONING_VERSION_CODE",
35
- description: "Change to a specific version (optional)",
36
- optional: true,
37
- type: Integer)
36
+ FastlaneCore::ConfigItem.new(key: :app_project_dir,
37
+ env_name: "ANDROID_VERSIONING_APP_PROJECT_DIR",
38
+ description: "The path to the application source folder in the Android project (default: android/app)",
39
+ optional: true,
40
+ type: String,
41
+ default_value: "android/app"),
42
+ FastlaneCore::ConfigItem.new(key: :version_code,
43
+ env_name: "ANDROID_VERSIONING_VERSION_CODE",
44
+ description: "Change to a specific version (optional)",
45
+ optional: true,
46
+ type: Integer)
38
47
  ]
39
48
  end
40
49
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidVersioning
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu OHTAKE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-14 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry