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 +4 -4
- data/lib/fastlane/plugin/android_versioning/actions/get_value_from_build.rb +6 -6
- data/lib/fastlane/plugin/android_versioning/actions/get_version_code.rb +5 -5
- data/lib/fastlane/plugin/android_versioning/actions/get_version_name.rb +5 -5
- data/lib/fastlane/plugin/android_versioning/actions/increment_version_code.rb +5 -5
- data/lib/fastlane/plugin/android_versioning/actions/increment_version_name.rb +5 -5
- data/lib/fastlane/plugin/android_versioning/actions/set_value_in_build.rb +6 -6
- data/lib/fastlane/plugin/android_versioning/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96d42465660497fee3468e1e62bfa449e7a0c377
|
4
|
+
data.tar.gz: 2e470fcda181cb92a8db3b04107fb854945b5ef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
7
|
+
app_project_dir ||= params[:app_project_dir]
|
8
8
|
value = ""
|
9
9
|
found = false
|
10
|
-
Dir.glob("
|
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: :
|
34
|
-
env_name: "
|
35
|
-
description: "The
|
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
|
-
|
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: :
|
19
|
-
env_name: "
|
20
|
-
description: "The
|
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
|
-
|
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: :
|
19
|
-
env_name: "
|
20
|
-
description: "The
|
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
|
-
|
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: :
|
28
|
-
env_name: "
|
29
|
-
description: "The
|
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
|
-
|
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: :
|
47
|
-
env_name: "
|
48
|
-
description: "The
|
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
|
-
|
8
|
+
app_project_dir ||= params[:app_project_dir]
|
9
9
|
found = false
|
10
|
-
Dir.glob("
|
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: :
|
41
|
-
env_name: "
|
42
|
-
description: "The
|
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),
|
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
|
+
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-
|
11
|
+
date: 2017-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|