fastlane-plugin-android_versioning 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1eac86366dc5c9f537ee8f5c5e0ecd58ab29c91b
4
- data.tar.gz: 38017eeb89242e37dee67bdc6971271a44704021
3
+ metadata.gz: 96d42465660497fee3468e1e62bfa449e7a0c377
4
+ data.tar.gz: 2e470fcda181cb92a8db3b04107fb854945b5ef6
5
5
  SHA512:
6
- metadata.gz: 6d940e9b8be63342c0482ece4093302001c4249c15257a9c54247f57c35494212955250ffd5e179324677ebf2a081e7ebfd4e9ec960643eccd561bf221cf22a5
7
- data.tar.gz: 37d8e73b2566428d92a101715030cebd469fda6e0afd8c829db80f5437e94af148e8fef41d8aebdc65aa8c4cdf9ffd83fa97b223414e24c422b4b5735d1d2c3c
6
+ metadata.gz: 1959504d9d6ac7eb47605706f79121917212acc9642921003a50f422e97c363fc9ce21ee63766914819bf2b53a015028499563a80dd517e91b07c7e48eb0dea2
7
+ data.tar.gz: 45115e0d1a33cf0411b1e72e91299254ae516933be172eeac10dca03dd9873184e09aa921b96aaa0ca590d9eb9bb8d657be13439bb8d0e77ed175e558f01cd57
@@ -4,10 +4,10 @@ module Fastlane
4
4
  module Actions
5
5
  class GetValueFromBuildAction < Action
6
6
  def self.run(params)
7
- app_folder_name ||= params[:app_folder_name]
7
+ app_project_dir ||= params[:app_project_dir]
8
8
  value = ""
9
9
  found = false
10
- Dir.glob("**/#{app_folder_name}/build.gradle") do |path|
10
+ Dir.glob("#{app_project_dir}/build.gradle") do |path|
11
11
  begin
12
12
  File.open(path, 'r') do |file|
13
13
  file.each_line do |line|
@@ -30,12 +30,12 @@ module Fastlane
30
30
  #####################################################
31
31
  def self.available_options
32
32
  [
33
- FastlaneCore::ConfigItem.new(key: :app_folder_name,
34
- env_name: "ANDROID_VERSIONING_APP_FOLDER_NAME",
35
- description: "The name of the application source folder in the Android project (default: app)",
33
+ FastlaneCore::ConfigItem.new(key: :app_project_dir,
34
+ env_name: "ANDROID_VERSIONING_APP_PROJECT_DIR",
35
+ description: "The path to the application source folder in the Android project (default: android/app)",
36
36
  optional: true,
37
37
  type: String,
38
- default_value: "app"),
38
+ default_value: "android/app"),
39
39
  FastlaneCore::ConfigItem.new(key: :key,
40
40
  description: "The property key",
41
41
  type: String)
@@ -5,7 +5,7 @@ module Fastlane
5
5
  class GetVersionCodeAction < Action
6
6
  def self.run(params)
7
7
  GetValueFromBuildAction.run(
8
- app_folder_name: params[:app_folder_name],
8
+ app_project_dir: params[:app_project_dir],
9
9
  key: "versionCode"
10
10
  )
11
11
  end
@@ -15,12 +15,12 @@ module Fastlane
15
15
  #####################################################
16
16
  def self.available_options
17
17
  [
18
- FastlaneCore::ConfigItem.new(key: :app_folder_name,
19
- env_name: "ANDROID_VERSIONING_APP_FOLDER_NAME",
20
- description: "The name of the application source folder in the Android project (default: app)",
18
+ FastlaneCore::ConfigItem.new(key: :app_project_dir,
19
+ env_name: "ANDROID_VERSIONING_APP_PROJECT_DIR",
20
+ description: "The path to the application source folder in the Android project (default: android/app)",
21
21
  optional: true,
22
22
  type: String,
23
- default_value: "app")
23
+ default_value: "android/app")
24
24
  ]
25
25
  end
26
26
 
@@ -5,7 +5,7 @@ module Fastlane
5
5
  class GetVersionNameAction < Action
6
6
  def self.run(params)
7
7
  GetValueFromBuildAction.run(
8
- app_folder_name: params[:app_folder_name],
8
+ app_project_dir: params[:app_project_dir],
9
9
  key: "versionName"
10
10
  )
11
11
  end
@@ -15,12 +15,12 @@ module Fastlane
15
15
  #####################################################
16
16
  def self.available_options
17
17
  [
18
- FastlaneCore::ConfigItem.new(key: :app_folder_name,
19
- env_name: "ANDROID_VERSIONING_APP_FOLDER_NAME",
20
- description: "The name of the application source folder in the Android project (default: app)",
18
+ FastlaneCore::ConfigItem.new(key: :app_project_dir,
19
+ env_name: "ANDROID_VERSIONING_APP_PROJECT_DIR",
20
+ description: "The path to the application source folder in the Android project (default: android/app)",
21
21
  optional: true,
22
22
  type: String,
23
- default_value: "app")
23
+ default_value: "android/app")
24
24
  ]
25
25
  end
26
26
 
@@ -11,7 +11,7 @@ module Fastlane
11
11
  current_version_code = GetVersionCodeAction.run(params)
12
12
  new_version_code = params[:version_code].nil? ? current_version_code.to_i + 1 : params[:version_code].to_i
13
13
  SetValueInBuildAction.run(
14
- app_folder_name: params[:app_folder_name],
14
+ app_project_dir: params[:app_project_dir],
15
15
  key: "versionCode",
16
16
  value: new_version_code
17
17
  )
@@ -24,12 +24,12 @@ module Fastlane
24
24
  #####################################################
25
25
  def self.available_options
26
26
  [
27
- FastlaneCore::ConfigItem.new(key: :app_folder_name,
28
- env_name: "ANDROID_VERSIONING_APP_FOLDER_NAME",
29
- description: "The name of the application source folder in the Android project (default: app)",
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
30
  optional: true,
31
31
  type: String,
32
- default_value: "app"),
32
+ default_value: "android/app"),
33
33
  FastlaneCore::ConfigItem.new(key: :version_code,
34
34
  env_name: "ANDROID_VERSIONING_VERSION_CODE",
35
35
  description: "Change to a specific version (optional)",
@@ -30,7 +30,7 @@ module Fastlane
30
30
  new_version = params[:version_name]
31
31
  end
32
32
  SetValueInBuildAction.run(
33
- app_folder_name: params[:app_folder_name],
33
+ app_project_dir: params[:app_project_dir],
34
34
  key: "versionName",
35
35
  value: new_version
36
36
  )
@@ -43,12 +43,12 @@ module Fastlane
43
43
  #####################################################
44
44
  def self.available_options
45
45
  [
46
- FastlaneCore::ConfigItem.new(key: :app_folder_name,
47
- env_name: "ANDROID_VERSIONING_APP_FOLDER_NAME",
48
- description: "The name of the application source folder in the Android project (default: app)",
46
+ FastlaneCore::ConfigItem.new(key: :app_project_dir,
47
+ env_name: "ANDROID_VERSIONING_APP_PROJECT_DIR",
48
+ description: "The path to the application source folder in the Android project (default: android/app)",
49
49
  optional: true,
50
50
  type: String,
51
- default_value: "app"),
51
+ default_value: "android/app"),
52
52
  FastlaneCore::ConfigItem.new(key: :bump_type,
53
53
  env_name: "ANDROID_VERSIONING_BUMP_TYPE",
54
54
  description: "Change to a specific type (optional)",
@@ -5,9 +5,9 @@ module Fastlane
5
5
  module Actions
6
6
  class SetValueInBuildAction < Action
7
7
  def self.run(params)
8
- app_folder_name ||= params[:app_folder_name]
8
+ app_project_dir ||= params[:app_project_dir]
9
9
  found = false
10
- Dir.glob("**/#{app_folder_name}/build.gradle") do |path|
10
+ Dir.glob("#{app_project_dir}/build.gradle") do |path|
11
11
  begin
12
12
  temp_file = Tempfile.new('versioning')
13
13
  File.open(path, 'r') do |file|
@@ -37,12 +37,12 @@ module Fastlane
37
37
  #####################################################
38
38
  def self.available_options
39
39
  [
40
- FastlaneCore::ConfigItem.new(key: :app_folder_name,
41
- env_name: "ANDROID_VERSIONING_APP_FOLDER_NAME",
42
- description: "The name of the application source folder in the Android project (default: app)",
40
+ FastlaneCore::ConfigItem.new(key: :app_project_dir,
41
+ env_name: "ANDROID_VERSIONING_APP_PROJECT_DIR",
42
+ description: "The path to the application source folder in the Android project (default: android/app)",
43
43
  optional: true,
44
44
  type: String,
45
- default_value: "app"),
45
+ default_value: "android/app"),
46
46
  FastlaneCore::ConfigItem.new(key: :key,
47
47
  description: "The property key",
48
48
  type: String),
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidVersioning
3
- VERSION = "0.2.2"
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-android_versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.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: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2017-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry