fastlane-plugin-fivethree_ionic 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_android_keystore.rb +125 -0
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_client.rb +59 -0
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_clients.rb +74 -0
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_env.rb +73 -0
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_sign_android.rb +71 -43
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb +7 -2
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb +10 -11
- data/lib/fastlane/plugin/fivethree_ionic/version.rb +1 -1
- metadata +8 -8
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_android_keystore_action.rb +0 -129
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_branding.rb +0 -91
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_brandings.rb +0 -106
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2f509270835008441453a133f18e5ce76088d0d186e9d7f4408f0b500071f4e3
|
4
|
+
data.tar.gz: 1e23ccf97a7bd6591a08ab86ff2077669e24c6ecd8d3b94f0a993a9f428906b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a56f30758cb636aba517021be7ed3997372820a6fd8c936e1ba22becb1fd386513c6ad8ca0c70414b7bcaec82ccf56dcfd36e12dcef40669d544e1c13bca47c3
|
7
|
+
data.tar.gz: 1c31eb89a21c546fd40c08e117d08e9cca9383d519a57a6f578154cf4abf6787b540ebb0bc43ce2a5035dccb53199c33b28647b69839eaefb995c32b68105a1e
|
@@ -0,0 +1,125 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class FivAndroidKeystoreAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
keystore_path = params[:keystore_path]
|
6
|
+
keystore_name = params[:keystore_name]
|
7
|
+
keystore_file = File.join(keystore_path, keystore_name) + '.keystore'
|
8
|
+
|
9
|
+
# Validating output doesn't exist yet for our android signing info
|
10
|
+
if File.directory?(keystore_path)
|
11
|
+
if File.exists?(keystore_file)
|
12
|
+
return keystore_file
|
13
|
+
end
|
14
|
+
else
|
15
|
+
UI.message "android keystore doesnt exist yet. creating one for you..."
|
16
|
+
Dir.mkdir keystore_path
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
puts "Please enter the keystore password for new keystore with atleast 6 characters:"
|
21
|
+
keychain_entry = CredentialsManager::AccountManager.new(user: "#{keystore_name}_android_keystore_storepass")
|
22
|
+
password = keychain_entry.password
|
23
|
+
|
24
|
+
puts "Please enter the keystore password for new keystore atleast 6 characters:"
|
25
|
+
keypass_entry = CredentialsManager::AccountManager.new(user: "#{keystore_name}_android_keystore_keypass")
|
26
|
+
key_password = keypass_entry.password
|
27
|
+
|
28
|
+
alias_name = params[:key_alias]
|
29
|
+
puts "Keystore alias #{alias_name}"
|
30
|
+
|
31
|
+
full_name = Fastlane::Actions::PromptAction.run(text:"Enter kexystore full name")
|
32
|
+
org = Fastlane::Actions::PromptAction.run(text:"Enter kexystore org")
|
33
|
+
org_unit = Fastlane::Actions::PromptAction.run(text:"Enter kexystore org unit")
|
34
|
+
city_locality = Fastlane::Actions::PromptAction.run(text:"Enter city")
|
35
|
+
state_province = Fastlane::Actions::PromptAction.run(text:"Enter state")
|
36
|
+
country = Fastlane::Actions::PromptAction.run(text:"country")
|
37
|
+
|
38
|
+
# Create keystore with command
|
39
|
+
unless File.file?(keystore_file)
|
40
|
+
keytool = "keytool -genkey -v \
|
41
|
+
-keystore #{keystore_file} \
|
42
|
+
-alias #{alias_name} \
|
43
|
+
-keyalg RSA -keysize 2048 -validity 10000 \
|
44
|
+
-storepass #{password} \
|
45
|
+
-keypass #{key_password} \
|
46
|
+
-dname \"CN=#{full_name}, OU=#{org_unit}, O=#{org}, L=#{city_locality}, S=#{state_province}, C=#{country}\"
|
47
|
+
"
|
48
|
+
sh keytool
|
49
|
+
else
|
50
|
+
UI.message "Keystore file already exists - #{keystore_file}"
|
51
|
+
end
|
52
|
+
|
53
|
+
# Create release-signing.properties for automatic signing with Ionic
|
54
|
+
release_signing_path = File.join(keystore_path, "release-signing.properties")
|
55
|
+
|
56
|
+
unless File.file?(release_signing_path)
|
57
|
+
out_file = File.new(release_signing_path, "w")
|
58
|
+
out_file.puts("storeFile=#{keystore_name}")
|
59
|
+
out_file.puts("storePassword=#{password}")
|
60
|
+
out_file.puts("keyAlias=#{alias_name}")
|
61
|
+
out_file.puts("keyPassword=#{key_password}")
|
62
|
+
out_file.close
|
63
|
+
else
|
64
|
+
UI.message "release-signing.properties file already exists - #{release_signing_path}"
|
65
|
+
end
|
66
|
+
|
67
|
+
return keystore_file
|
68
|
+
end
|
69
|
+
|
70
|
+
#####################################################
|
71
|
+
# @!group Documentation
|
72
|
+
#####################################################
|
73
|
+
|
74
|
+
def self.description
|
75
|
+
"Generate an Android keystore file or validate keystore exists"
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.details
|
79
|
+
"Generate an Android keystore file or validate keystore exists"
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.available_options
|
83
|
+
[
|
84
|
+
FastlaneCore::ConfigItem.new(
|
85
|
+
key: :keystore_path,
|
86
|
+
env_name: "FIV_KEYSTORE_PATH",
|
87
|
+
description: "Path to android keystore",
|
88
|
+
is_string: true,
|
89
|
+
default_value: "./fastlane/android"),
|
90
|
+
FastlaneCore::ConfigItem.new(
|
91
|
+
key: :keystore_name,
|
92
|
+
env_name: "FIV_KEYSTORE_NAME",
|
93
|
+
description: "Name of the keystore",
|
94
|
+
is_string: true,
|
95
|
+
optional: false),
|
96
|
+
FastlaneCore::ConfigItem.new(
|
97
|
+
key: :key_alias,
|
98
|
+
env_name: "FIV_ANDROID_KEYSTORE_ALIAS",
|
99
|
+
description: "Key alias of the keystore",
|
100
|
+
is_string: true,
|
101
|
+
optional: false)
|
102
|
+
]
|
103
|
+
end
|
104
|
+
|
105
|
+
def self.output
|
106
|
+
[
|
107
|
+
['ANDROID_KEYSTORE_KEYSTORE_PATH', 'Path to keystore'],
|
108
|
+
['ANDROID_KEYSTORE_RELEASE_SIGNING_PATH', 'Path to release-signing.properties']
|
109
|
+
]
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.return_value
|
113
|
+
"Path to keystore"
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.authors
|
117
|
+
["fivethree"]
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.is_supported?(platform)
|
121
|
+
platform == :android
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class FivSelectClientAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
Dir.chdir "#{params[:clients_folder]}" do
|
6
|
+
clients_folders = Dir.glob('*').sort.select {|f| File.directory? f}
|
7
|
+
if (ENV["CLIENT"])
|
8
|
+
if (clients_folders.include?(ENV["CLIENT"]))
|
9
|
+
puts("
|
10
|
+
***********************************************
|
11
|
+
Selected client: #{ENV["CLIENT"]}
|
12
|
+
***********************************************
|
13
|
+
")
|
14
|
+
return ENV["CLIENT"]
|
15
|
+
else
|
16
|
+
UI.user_error!("Client #{ENV["CLIENT"]} is not available.")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
selected_client = UI.select("Select one client: ", clients_folders)
|
21
|
+
|
22
|
+
puts("
|
23
|
+
***********************************************
|
24
|
+
Selected client: #{selected_client}
|
25
|
+
***********************************************
|
26
|
+
")
|
27
|
+
return selected_client
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.description
|
32
|
+
"Select a client"
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.available_options
|
36
|
+
[
|
37
|
+
FastlaneCore::ConfigItem.new(
|
38
|
+
key: :clients_folder,
|
39
|
+
env_name: "FIV_CLIENTS_FOLDER", # The name of the environment variable
|
40
|
+
description: "Clients folder path for SelectClientAction", # a short description of this parameter
|
41
|
+
default_value: "clients",
|
42
|
+
is_string: true,
|
43
|
+
verify_block: proc do |value|
|
44
|
+
UI.user_error!("No client folder path for SelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`") unless (value and not value.empty?)
|
45
|
+
UI.user_error!("Couldn't find clients folder at path '#{value}'") unless File.directory?(value)
|
46
|
+
end)
|
47
|
+
]
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.author
|
51
|
+
"Marc"
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.is_supported?(platform)
|
55
|
+
[:ios, :mac, :android].include? platform
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class FivSelectClientsAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
clients = []
|
6
|
+
Dir.chdir "#{params[:clients_folder]}" do
|
7
|
+
clients_folders = Dir.glob('*').sort.select {|f| File.directory? f}
|
8
|
+
|
9
|
+
if(ENV["CLIENTS"])
|
10
|
+
envClients = ENV["CLIENTS"].split(",")
|
11
|
+
selectedClients = envClients.select{|x| clients_folders.include?(x) }
|
12
|
+
puts("
|
13
|
+
***********************************************
|
14
|
+
Selected clients: #{selectedClients}
|
15
|
+
***********************************************
|
16
|
+
")
|
17
|
+
return selectedClients
|
18
|
+
end
|
19
|
+
|
20
|
+
clients_folders.unshift("All")
|
21
|
+
selected_client = UI.select("Select clients: ", clients_folders)
|
22
|
+
|
23
|
+
if (selected_client === "All")
|
24
|
+
clients_folders.shift()
|
25
|
+
puts("
|
26
|
+
***********************************************
|
27
|
+
Selected clients: #{clients_folders}
|
28
|
+
***********************************************
|
29
|
+
")
|
30
|
+
return clients_folders
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
puts("
|
35
|
+
***********************************************
|
36
|
+
Selected client: #{selected_client}
|
37
|
+
***********************************************
|
38
|
+
")
|
39
|
+
clients.push(selected_client)
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
return clients
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.description
|
47
|
+
"Select list of clients"
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.available_options
|
51
|
+
[
|
52
|
+
FastlaneCore::ConfigItem.new(
|
53
|
+
key: :clients_folder,
|
54
|
+
env_name: "FIV_CLIENTS_FOLDER", # The name of the environment variable
|
55
|
+
description: "Clients folder path for SelectClientAction", # a short description of this parameter
|
56
|
+
default_value: "clients",
|
57
|
+
is_string: true,
|
58
|
+
verify_block: proc do |value|
|
59
|
+
UI.user_error!("No client folder path for FivSelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`") unless (value and not value.empty?)
|
60
|
+
UI.user_error!("Couldn't find clients folder at path '#{value}'") unless File.directory?(value)
|
61
|
+
end)
|
62
|
+
]
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.author
|
66
|
+
"Marc"
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.is_supported?(platform)
|
70
|
+
[:ios, :mac, :android].include? platform
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class FivSelectEnvAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
Dir.chdir "#{params[:clients_folder]}/#{params[:client]}/#{params[:environments_folder]}" do
|
6
|
+
environment = Dir.glob('*').sort.select {|f| File.directory? f}
|
7
|
+
if (ENV["ENV"] && environment.include?(ENV["ENV"]))
|
8
|
+
puts("
|
9
|
+
***********************************************
|
10
|
+
Selected environment: #{ENV["ENV"]}
|
11
|
+
***********************************************
|
12
|
+
")
|
13
|
+
return ENV["ENV"]
|
14
|
+
end
|
15
|
+
|
16
|
+
selected_env = UI.select("Select one environment: ", environment)
|
17
|
+
|
18
|
+
puts("
|
19
|
+
***********************************************
|
20
|
+
Selected environment: #{selected_env}
|
21
|
+
***********************************************
|
22
|
+
")
|
23
|
+
return selected_env
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.description
|
28
|
+
"Select a client"
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.available_options
|
32
|
+
[
|
33
|
+
FastlaneCore::ConfigItem.new(
|
34
|
+
key: :clients_folder,
|
35
|
+
env_name: "FIV_CLIENTS_FOLDER", # The name of the environment variable
|
36
|
+
description: "Clients folder path for SelectEnvAction", # a short description of this parameter
|
37
|
+
default_value: "clients",
|
38
|
+
is_string: true,
|
39
|
+
verify_block: proc do |value|
|
40
|
+
UI.user_error!("No client folder path for SelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`") unless (value and not value.empty?)
|
41
|
+
UI.user_error!("Couldn't find clients folder at path '#{value}'") unless File.directory?(value)
|
42
|
+
end),
|
43
|
+
FastlaneCore::ConfigItem.new(
|
44
|
+
key: :environments_folder,
|
45
|
+
env_name: "FIV_ENVIRONMENT_FOLDER", # The name of the environment variable
|
46
|
+
description: "Environment folder path for SelectEnvAction", # a short description of this parameter
|
47
|
+
default_value: "environments",
|
48
|
+
is_string: true,
|
49
|
+
verify_block: proc do |value|
|
50
|
+
UI.user_error!("No environment folder path for SelectClientAction given, pass using `environment: '../path_to_environment_folder'`") unless (value and not value.empty?)
|
51
|
+
end),
|
52
|
+
FastlaneCore::ConfigItem.new(
|
53
|
+
key: :client,
|
54
|
+
env_name: "FIV_CLIENT", # The name of the environment variable
|
55
|
+
description: "Client folder path for SelectEnvAction", # a short description of this parameter
|
56
|
+
is_string: true,
|
57
|
+
optional: false,
|
58
|
+
verify_block: proc do |value|
|
59
|
+
UI.user_error!("No client folder path for SelectEnvAction given, pass using `client: '../path_to_client_folder'`") unless (value and not value.empty?)
|
60
|
+
end)
|
61
|
+
]
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.author
|
65
|
+
"Marc"
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.is_supported?(platform)
|
69
|
+
[:ios, :mac, :android].include? platform
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -1,14 +1,7 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
-
module SharedValues
|
4
|
-
CORDOVA_IOS_RELEASE_BUILD_PATH = :CORDOVA_IOS_RELEASE_BUILD_PATH
|
5
|
-
CORDOVA_ANDROID_RELEASE_BUILD_PATH = :CORDOVA_ANDROID_RELEASE_BUILD_PATH
|
6
|
-
end
|
7
|
-
|
8
3
|
class FivSignAndroidAction < Action
|
9
4
|
def self.run(params)
|
10
|
-
|
11
|
-
|
12
5
|
keystore_path = Fastlane::Actions::FivAndroidKeystoreAction.run(params)
|
13
6
|
|
14
7
|
keychain_entry = CredentialsManager::AccountManager.new(user: "#{params[:keystore_name]}_android_keystore_storepass")
|
@@ -17,20 +10,35 @@ module Fastlane
|
|
17
10
|
keychain_entry = CredentialsManager::AccountManager.new(user: "#{params[:keystore_name]}_android_keystore_keypass")
|
18
11
|
keystore_keypass = keychain_entry.password
|
19
12
|
|
20
|
-
puts "
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
puts "You can delete the password if they are wrong stored in the keychain: 'fastlane fastlane-credentials remove --username android_keystore_storepass' and 'fastlane fastlane-credentials remove --username android_keystore_keypass'"
|
14
|
+
|
15
|
+
android_build_tool_path = "#{params[:android_sdk_path]}/build-tools/#{params[:android_build_tool_version]}"
|
16
|
+
|
17
|
+
# zipalign APK
|
18
|
+
remove_zipalign = "rm -Rf ../platforms/android/app/build/outputs/apk/release/app-release-unsigned-zipalign.apk"
|
19
|
+
sh remove_zipalign
|
20
|
+
zipalign = "#{android_build_tool_path}/zipalign -v 4 \
|
21
|
+
../platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk \
|
22
|
+
../platforms/android/app/build/outputs/apk/release/app-release-unsigned-zipalign.apk"
|
23
|
+
sh zipalign
|
24
|
+
|
25
|
+
if(!File.directory?(params[:apk_output_dir]))
|
26
|
+
Dir.mkdir params[:apk_output_dir]
|
30
27
|
end
|
31
|
-
|
32
|
-
|
28
|
+
output_path = "#{params[:apk_output_dir]}/app-release-#{params[:app_version]}-#{params[:app_build_no]}.apk"
|
29
|
+
|
30
|
+
sign = "#{android_build_tool_path}/apksigner sign \
|
31
|
+
--ks #{keystore_path} \
|
32
|
+
--ks-key-alias #{params[:key_alias]} \
|
33
|
+
--ks-pass pass:#{keystore_keypass} \
|
34
|
+
--out #{output_path} \
|
35
|
+
../platforms/android/app/build/outputs/apk/release/app-release-unsigned-zipalign.apk"
|
36
|
+
self.run_shell_script(sign, params[:silent])
|
33
37
|
|
38
|
+
verify = ("#{android_build_tool_path}/apksigner verify -v #{output_path}")
|
39
|
+
self.run_shell_script(verify, params[:silent])
|
40
|
+
|
41
|
+
return output_path
|
34
42
|
end
|
35
43
|
|
36
44
|
#####################################################
|
@@ -38,12 +46,12 @@ module Fastlane
|
|
38
46
|
#####################################################
|
39
47
|
|
40
48
|
def self.description
|
41
|
-
"
|
42
|
-
end
|
43
|
-
def self.run_silent(command)
|
44
|
-
Fastlane::Actions::sh(command, log: false)
|
49
|
+
"Zipalign, sign and verify android apk"
|
45
50
|
end
|
46
51
|
|
52
|
+
def self.run_shell_script(command, silent)
|
53
|
+
Fastlane::Actions::sh(command, log: silent)
|
54
|
+
end
|
47
55
|
|
48
56
|
def self.details
|
49
57
|
# Optional:
|
@@ -56,40 +64,60 @@ module Fastlane
|
|
56
64
|
|
57
65
|
# Below a few examples
|
58
66
|
[
|
59
|
-
FastlaneCore::ConfigItem.new(
|
60
|
-
|
61
|
-
|
67
|
+
FastlaneCore::ConfigItem.new(
|
68
|
+
key: :keystore_path,
|
69
|
+
env_name: "FIV_KEYSTORE_PATH",
|
70
|
+
description: "Path to android keystore",
|
62
71
|
is_string: true,
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
env_name: "
|
67
|
-
description: "",
|
72
|
+
default_value: "./fastlane/android"),
|
73
|
+
FastlaneCore::ConfigItem.new(
|
74
|
+
key: :keystore_name,
|
75
|
+
env_name: "FIV_KEYSTORE_NAME",
|
76
|
+
description: "Name of the keystore",
|
68
77
|
is_string: true,
|
69
78
|
optional: false),
|
70
|
-
FastlaneCore::ConfigItem.new(
|
71
|
-
|
72
|
-
|
79
|
+
FastlaneCore::ConfigItem.new(
|
80
|
+
key: :android_sdk_path,
|
81
|
+
env_name: "FIV_ANDROID_SDK_PATH",
|
82
|
+
description: "Path to your installed Android SDK",
|
83
|
+
is_string: true,
|
84
|
+
default_value: "~/Library/Android/sdk"),
|
85
|
+
FastlaneCore::ConfigItem.new(
|
86
|
+
key: :android_build_tool_version,
|
87
|
+
env_name: "FIV_ANDROID_SDK_BUILD_TOOL_VERSION",
|
88
|
+
description: "Android Build Tool version used for `zipalign`, `sign` and `verify`",
|
89
|
+
is_string: true,
|
90
|
+
default_value: "28.0.3"),
|
91
|
+
FastlaneCore::ConfigItem.new(
|
92
|
+
key: :apk_output_dir,
|
93
|
+
env_name: "FIV_APK_OUTPUT_DIR",
|
94
|
+
description: "Output path of the signed apk",
|
95
|
+
is_string: true,
|
96
|
+
default_value: "../platforms/android/app/build/outputs/apk/release"),
|
97
|
+
FastlaneCore::ConfigItem.new(
|
98
|
+
key: :key_alias,
|
99
|
+
env_name: "FIV_ANDROID_KEYSTORE_ALIAS",
|
100
|
+
description: "Key alias of the keystore",
|
73
101
|
is_string: true,
|
74
102
|
optional: false),
|
75
103
|
FastlaneCore::ConfigItem.new(
|
76
|
-
key: :
|
77
|
-
env_name: "
|
78
|
-
description: "
|
104
|
+
key: :app_version,
|
105
|
+
env_name: "FIV_APP_VERSION",
|
106
|
+
description: "App version",
|
79
107
|
is_string: true,
|
80
108
|
default_value: ''
|
81
109
|
),
|
82
110
|
FastlaneCore::ConfigItem.new(
|
83
|
-
key: :
|
84
|
-
env_name: "
|
85
|
-
description: "
|
111
|
+
key: :app_build_no,
|
112
|
+
env_name: "FIV_APP_BUILD_NO",
|
113
|
+
description: "App build number",
|
86
114
|
is_string: true,
|
87
115
|
default_value: ''
|
88
116
|
),
|
89
117
|
FastlaneCore::ConfigItem.new(
|
90
118
|
key: :silent,
|
91
|
-
env_name: "
|
92
|
-
description: "
|
119
|
+
env_name: "FIV_SIGN_ANDROID_SILENT",
|
120
|
+
description: "Wether to sign android silently",
|
93
121
|
is_string: false,
|
94
122
|
default_value: true
|
95
123
|
)
|
@@ -110,7 +138,7 @@ FastlaneCore::ConfigItem.new(key: :key_alias,
|
|
110
138
|
|
111
139
|
def self.authors
|
112
140
|
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
113
|
-
["
|
141
|
+
["marcjulian"]
|
114
142
|
end
|
115
143
|
|
116
144
|
def self.is_supported?(platform)
|
@@ -7,8 +7,13 @@ module Fastlane
|
|
7
7
|
module Actions
|
8
8
|
class FivUpdateVersionAndBuildNoAction < Action
|
9
9
|
def self.run(params)
|
10
|
-
|
11
|
-
|
10
|
+
version;
|
11
|
+
if(params[:skip_version])
|
12
|
+
old_version = sh "echo \"cat //*[local-name()='widget']/@version\" | xmllint --shell #{params[:pathToConfigXML]}| awk -F'[=\"]' '!/>/{print $(NF-1)}'"
|
13
|
+
version = old_version.delete!("\n")
|
14
|
+
else
|
15
|
+
version = Fastlane::Actions::FivUpdateVersionAction.run(pathToConfigXML:params[:pathToConfigXML])
|
16
|
+
end
|
12
17
|
build_no = Fastlane::Actions::FivIncrementBuildNoAction.run(
|
13
18
|
pathToConfigXML: params[:pathToConfigXML],
|
14
19
|
ios: params[:ios]
|
@@ -9,20 +9,19 @@ module Fastlane
|
|
9
9
|
version_and_build_no = Fastlane::Actions::FivUpdateVersionAndBuildNoAction.run(ios: params[:ios],pathToConfigXML:params[:pathToConfigXML])
|
10
10
|
|
11
11
|
Fastlane::Actions::FivBumpVersionAction.run(
|
12
|
-
message: "
|
12
|
+
message: "fastlane(#{params[:ios] ? "ios" : "android"}): build #{version_and_build_no[:build_no]}, version: #{version_and_build_no[:version]}"
|
13
13
|
)
|
14
14
|
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
return version_and_build_no
|
16
|
+
Fastlane::Actions::PushToGitRemoteAction.run(
|
17
|
+
remote: params[:remote],
|
18
|
+
local_branch: params[:local_branch],
|
19
|
+
remote_branch: params[:remote_branch],
|
20
|
+
force: params[:force],
|
21
|
+
tags: params[:tags]
|
22
|
+
)
|
25
23
|
|
24
|
+
return version_and_build_no
|
26
25
|
end
|
27
26
|
|
28
27
|
#####################################################
|
@@ -98,7 +97,7 @@ FastlaneCore::ConfigItem.new(key: :pathToConfigXML,
|
|
98
97
|
|
99
98
|
def self.authors
|
100
99
|
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
101
|
-
["
|
100
|
+
["garygrossgarten"]
|
102
101
|
end
|
103
102
|
|
104
103
|
def self.is_supported?(platform)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-fivethree_ionic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Stammerjohann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 2.102.0
|
139
139
|
description:
|
140
|
-
email:
|
140
|
+
email: marc@fivethree.io
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
143
143
|
extra_rdoc_files: []
|
@@ -146,14 +146,15 @@ files:
|
|
146
146
|
- README.md
|
147
147
|
- lib/fastlane/plugin/fivethree_ionic.rb
|
148
148
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_add_transparent_statusbar.rb
|
149
|
-
- lib/fastlane/plugin/fivethree_ionic/actions/
|
149
|
+
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_android_keystore.rb
|
150
150
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_build_ionic_android.rb
|
151
151
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_bump_version.rb
|
152
152
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb
|
153
153
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_increment_build_no.rb
|
154
154
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_ionic.rb
|
155
|
-
- lib/fastlane/plugin/fivethree_ionic/actions/
|
156
|
-
- lib/fastlane/plugin/fivethree_ionic/actions/
|
155
|
+
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_client.rb
|
156
|
+
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_clients.rb
|
157
|
+
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_env.rb
|
157
158
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_sign_android.rb
|
158
159
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_take_screenshots.rb
|
159
160
|
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version.rb
|
@@ -180,8 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
181
|
- !ruby/object:Gem::Version
|
181
182
|
version: '0'
|
182
183
|
requirements: []
|
183
|
-
|
184
|
-
rubygems_version: 2.5.2.3
|
184
|
+
rubygems_version: 3.0.3
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Fastlane plugin for Ionic v4 Projects
|
@@ -1,129 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
module SharedValues
|
4
|
-
ANDROID_KEYSTORE_KEYSTORE_PATH = :ANDROID_KEYSTORE_KEYSTORE_PATH
|
5
|
-
ANDROID_KEYSTORE_RELEASE_SIGNING_PATH = :ANDROID_KEYSTORE_RELEASE_SIGNING_PATH
|
6
|
-
end
|
7
|
-
|
8
|
-
class FivAndroidKeystoreAction < Action
|
9
|
-
def self.run(params)
|
10
|
-
|
11
|
-
output_directory = params[:output_directory]
|
12
|
-
keystore_name = params[:keystore_name]
|
13
|
-
keystore_path = File.join(output_directory, keystore_name) + '.keystore'
|
14
|
-
|
15
|
-
# Validating output doesn't exist yet for our android signing info
|
16
|
-
if File.directory?(output_directory)
|
17
|
-
if File.exists?(keystore_path)
|
18
|
-
return keystore_path
|
19
|
-
end
|
20
|
-
else
|
21
|
-
UI.message "android keystore doesnt exist yet. creating one for you..."
|
22
|
-
Dir.mkdir output_directory
|
23
|
-
end
|
24
|
-
|
25
|
-
|
26
|
-
puts "Please enter the keystore password for new keystore:"
|
27
|
-
keychain_entry = CredentialsManager::AccountManager.new(user: "#{keystore_name}_android_keystore_storepass")
|
28
|
-
password = keychain_entry.password
|
29
|
-
|
30
|
-
puts "Please enter the keystore password for new keystore:"
|
31
|
-
keypass_entry = CredentialsManager::AccountManager.new(user: "#{keystore_name}_android_keystore_keypass")
|
32
|
-
key_password = keypass_entry.password
|
33
|
-
|
34
|
-
alias_name = Fastlane::Actions::PromptAction.run(text:"Enter kexystore alias")
|
35
|
-
|
36
|
-
|
37
|
-
full_name = Fastlane::Actions::PromptAction.run(text:"Enter kexystore full name")
|
38
|
-
org = Fastlane::Actions::PromptAction.run(text:"Enter kexystore org")
|
39
|
-
org_unit = Fastlane::Actions::PromptAction.run(text:"Enter kexystore org unit")
|
40
|
-
city_locality = Fastlane::Actions::PromptAction.run(text:"Enter city")
|
41
|
-
state_province = Fastlane::Actions::PromptAction.run(text:"Enter state")
|
42
|
-
country = Fastlane::Actions::PromptAction.run(text:"country")
|
43
|
-
|
44
|
-
Actions.lane_context[SharedValues::ANDROID_KEYSTORE_KEYSTORE_PATH] = keystore_path
|
45
|
-
|
46
|
-
# Create keystore with command
|
47
|
-
unless File.file?(keystore_path)
|
48
|
-
keytool_parts = [
|
49
|
-
"keytool -genkey -v",
|
50
|
-
"-keystore #{keystore_path}",
|
51
|
-
"-alias #{alias_name}",
|
52
|
-
"-keyalg RSA -keysize 2048 -validity 10000",
|
53
|
-
"-storepass #{password} ",
|
54
|
-
"-keypass #{key_password}",
|
55
|
-
"-dname \"CN=#{full_name}, OU=#{org_unit}, O=#{org}, L=#{city_locality}, S=#{state_province}, C=#{country}\"",
|
56
|
-
]
|
57
|
-
sh keytool_parts.join(" ")
|
58
|
-
else
|
59
|
-
UI.message "Keystore file already exists - #{keystore_path}"
|
60
|
-
end
|
61
|
-
|
62
|
-
# Create release-signing.properties for automatic signing with Ionic
|
63
|
-
|
64
|
-
release_signing_path = File.join(output_directory, "release-signing.properties")
|
65
|
-
Actions.lane_context[SharedValues::ANDROID_KEYSTORE_RELEASE_SIGNING_PATH] = release_signing_path
|
66
|
-
|
67
|
-
unless File.file?(release_signing_path)
|
68
|
-
out_file = File.new(release_signing_path, "w")
|
69
|
-
out_file.puts("storeFile=#{keystore_name}")
|
70
|
-
out_file.puts("storePassword=#{password}")
|
71
|
-
out_file.puts("keyAlias=#{alias_name}")
|
72
|
-
out_file.puts("keyPassword=#{key_password}")
|
73
|
-
out_file.close
|
74
|
-
else
|
75
|
-
UI.message "release-signing.properties file already exists - #{release_signing_path}"
|
76
|
-
end
|
77
|
-
|
78
|
-
return keystore_path
|
79
|
-
end
|
80
|
-
|
81
|
-
#####################################################
|
82
|
-
# @!group Documentation
|
83
|
-
#####################################################
|
84
|
-
|
85
|
-
def self.description
|
86
|
-
"Generate an Android keystore file"
|
87
|
-
end
|
88
|
-
|
89
|
-
def self.details
|
90
|
-
"Generate an Android keystore file"
|
91
|
-
end
|
92
|
-
|
93
|
-
def self.available_options
|
94
|
-
[
|
95
|
-
FastlaneCore::ConfigItem.new(key: :output_directory,
|
96
|
-
env_name: "ANDROID_KEYSTORE_OUTPUT_DIRECTORY",
|
97
|
-
description: "",
|
98
|
-
is_string: true,
|
99
|
-
optional: false,
|
100
|
-
default_value: File.absolute_path(File.join(Dir.pwd, ".android_signing"))),
|
101
|
-
FastlaneCore::ConfigItem.new(key: :keystore_name,
|
102
|
-
env_name: "ANDROID_KEYSTORE_KEYSTORE_NAME",
|
103
|
-
description: "",
|
104
|
-
is_string: true,
|
105
|
-
optional: false)
|
106
|
-
]
|
107
|
-
end
|
108
|
-
|
109
|
-
def self.output
|
110
|
-
[
|
111
|
-
['ANDROID_KEYSTORE_KEYSTORE_PATH', 'Path to keystore'],
|
112
|
-
['ANDROID_KEYSTORE_RELEASE_SIGNING_PATH', 'Path to release-signing.properties']
|
113
|
-
]
|
114
|
-
end
|
115
|
-
|
116
|
-
def self.return_value
|
117
|
-
"Path to keystore"
|
118
|
-
end
|
119
|
-
|
120
|
-
def self.authors
|
121
|
-
["fivethree"]
|
122
|
-
end
|
123
|
-
|
124
|
-
def self.is_supported?(platform)
|
125
|
-
platform == :android
|
126
|
-
end
|
127
|
-
end
|
128
|
-
end
|
129
|
-
end
|
@@ -1,91 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
module SharedValues
|
4
|
-
FIV_SELECTED_BRANDING_KEY = :FIV_SELECTED_BRANDING_KEY
|
5
|
-
FIV_SELECTED_BRANDING_PATH = :FIV_SELECTED_BRANDING_PATH
|
6
|
-
end
|
7
|
-
|
8
|
-
class FivSelectBrandingAction < Action
|
9
|
-
def self.run(params)
|
10
|
-
Dir.chdir "#{params[:branding_folder]}" do
|
11
|
-
branding_folders = Dir.glob('*').select {|f| File.directory? f}
|
12
|
-
selected_branding_key = UI.select("Select one branding: ", branding_folders)
|
13
|
-
|
14
|
-
puts "
|
15
|
-
***********************************************
|
16
|
-
Selected branding key = #{selected_branding_key}
|
17
|
-
***********************************************
|
18
|
-
"
|
19
|
-
|
20
|
-
ENV['FIV_SELECTED_BRANDING_KEY'] = selected_branding_key
|
21
|
-
ENV['FIV_SELECTED_BRANDING_PATH'] = "#{params[:branding_folder]}/#{selected_branding_key}"
|
22
|
-
|
23
|
-
return selected_branding_key
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
#####################################################
|
28
|
-
# @!group Documentation
|
29
|
-
#####################################################
|
30
|
-
|
31
|
-
def self.description
|
32
|
-
"Action lets the user select one branding key from a folder"
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.details
|
36
|
-
# Optional:
|
37
|
-
# this is your chance to provide a more detailed description of this action
|
38
|
-
"For whitelabel programming it is very helpful to extract all assets into a `brandings` folder.
|
39
|
-
This actions helps to select one branding key which can further be used to copy assets, build application or more."
|
40
|
-
end
|
41
|
-
|
42
|
-
def self.available_options
|
43
|
-
# Define all options your action supports.
|
44
|
-
|
45
|
-
# Below a few examples
|
46
|
-
[
|
47
|
-
FastlaneCore::ConfigItem.new(key: :branding_folder,
|
48
|
-
env_name: "FIV_SELECT_BRANDING_API_TOKEN", # The name of the environment variable
|
49
|
-
description: "Branding folder path for FivSelectBrandingAction", # a short description of this parameter
|
50
|
-
default_value: "brandings",
|
51
|
-
is_string: true,
|
52
|
-
verify_block: proc do |value|
|
53
|
-
UI.user_error!("No branding folder path for FivSelectBrandingAction given, pass using `branding_folder: '../path_to_branding_folder'`") unless (value and not value.empty?)
|
54
|
-
UI.user_error!("Couldn't find branding folder at path '#{value}'") unless File.directory?(value)
|
55
|
-
end)
|
56
|
-
]
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.output
|
60
|
-
# Define the shared values you are going to provide
|
61
|
-
# Example
|
62
|
-
[
|
63
|
-
['FIV_SELECTED_BRANDING_KEY', 'Selected branding key'],
|
64
|
-
['FIV_SELECTED_BRANDING_PATH', 'Selected branding path']
|
65
|
-
]
|
66
|
-
end
|
67
|
-
|
68
|
-
def self.return_value
|
69
|
-
# If your method provides a return value, you can describe here what it does
|
70
|
-
end
|
71
|
-
|
72
|
-
def self.authors
|
73
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
74
|
-
["marcjulian"]
|
75
|
-
end
|
76
|
-
|
77
|
-
def self.is_supported?(platform)
|
78
|
-
# you can do things like
|
79
|
-
#
|
80
|
-
# true
|
81
|
-
#
|
82
|
-
# platform == :ios
|
83
|
-
#
|
84
|
-
# [:ios, :mac].include?(platform)
|
85
|
-
#
|
86
|
-
|
87
|
-
true
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
@@ -1,106 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
module SharedValues
|
4
|
-
FIV_SELECT_BRANDING_KEYS = :FIV_SELECT_BRANDING_KEYS
|
5
|
-
end
|
6
|
-
|
7
|
-
class FivSelectBrandingsAction < Action
|
8
|
-
def self.run(params)
|
9
|
-
branding_keys = []
|
10
|
-
|
11
|
-
if (ENV["SELECTED_BRANDING"])
|
12
|
-
# If comma separated branding array is specified via console parameter
|
13
|
-
ENV["SELECTED_BRANDING"].split(",").each {|branding| branding_keys.push(branding)}
|
14
|
-
else
|
15
|
-
puts "
|
16
|
-
***********************************************************************
|
17
|
-
You can also specify one or more brandings via command line parameter
|
18
|
-
e.g. 'brandings:branding1'
|
19
|
-
***********************************************************************
|
20
|
-
"
|
21
|
-
Dir.chdir "#{params[:branding_folder]}" do
|
22
|
-
branding_folders = Dir.glob('*').select {|f| File.directory? f}
|
23
|
-
branding_folders.unshift("ALL")
|
24
|
-
selected_branding_key = UI.select("Select branding: ", branding_folders)
|
25
|
-
|
26
|
-
if (selected_branding_key == "ALL")
|
27
|
-
branding_folders.shift # remove "ALL" entry
|
28
|
-
branding_keys = branding_folders
|
29
|
-
else
|
30
|
-
selected_branding_key.split(",").each {|branding| branding_keys.push(branding)}
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
puts "
|
36
|
-
***********************************************
|
37
|
-
Selected branding keys = #{branding_keys}
|
38
|
-
***********************************************
|
39
|
-
"
|
40
|
-
|
41
|
-
return branding_keys
|
42
|
-
end
|
43
|
-
|
44
|
-
#####################################################
|
45
|
-
# @!group Documentation
|
46
|
-
#####################################################
|
47
|
-
|
48
|
-
def self.description
|
49
|
-
"A short description with <= 80 characters of what this action does"
|
50
|
-
end
|
51
|
-
|
52
|
-
def self.details
|
53
|
-
# Optional:
|
54
|
-
# this is your chance to provide a more detailed description of this action
|
55
|
-
"You can use this action to do cool things..."
|
56
|
-
end
|
57
|
-
|
58
|
-
def self.available_options
|
59
|
-
# Define all options your action supports.
|
60
|
-
|
61
|
-
# Below a few examples
|
62
|
-
[
|
63
|
-
FastlaneCore::ConfigItem.new(key: :branding_folder,
|
64
|
-
env_name: "FIV_SELECT_BRANDING_FOLDER", # The name of the environment variable
|
65
|
-
description: "Branding folder path for FivSelectBrandingsAction", # a short description of this parameter
|
66
|
-
default_value: "brandings",
|
67
|
-
is_string: true,
|
68
|
-
verify_block: proc do |value|
|
69
|
-
UI.user_error!("No branding folder path for FivSelectBrandingAction given, pass using `branding_folder: '../path_to_branding_folder'`") unless (value and not value.empty?)
|
70
|
-
UI.user_error!("Couldn't find branding folder at path '#{value}'") unless File.directory?(value)
|
71
|
-
end)
|
72
|
-
]
|
73
|
-
end
|
74
|
-
|
75
|
-
def self.output
|
76
|
-
# Define the shared values you are going to provide
|
77
|
-
# Example
|
78
|
-
[
|
79
|
-
['FIV_SELECT_BRANDING_KEYS', 'A description of what this value contains']
|
80
|
-
]
|
81
|
-
end
|
82
|
-
|
83
|
-
def self.return_value
|
84
|
-
# If your method provides a return value, you can describe here what it does
|
85
|
-
end
|
86
|
-
|
87
|
-
def self.authors
|
88
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
89
|
-
["marcjulian"]
|
90
|
-
end
|
91
|
-
|
92
|
-
def self.is_supported?(platform)
|
93
|
-
# you can do things like
|
94
|
-
#
|
95
|
-
# true
|
96
|
-
#
|
97
|
-
# platform == :ios
|
98
|
-
#
|
99
|
-
# [:ios, :mac].include?(platform)
|
100
|
-
#
|
101
|
-
|
102
|
-
true
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|