fastlane-plugin-fivethree_ionic 0.2.7 → 0.2.8
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/fivethree_ionic.rb +1 -3
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_add_transparent_statusbar.rb +59 -40
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_android_keystore.rb +70 -42
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_build_ionic_android.rb +21 -15
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_bump_version.rb +20 -14
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb +42 -28
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_increment_build_no.rb +56 -36
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_ionic.rb +125 -82
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_client.rb +81 -57
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_clients.rb +78 -55
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_select_env.rb +96 -58
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_sign_android.rb +107 -60
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_take_screenshots.rb +32 -22
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version.rb +43 -28
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb +49 -33
- data/lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb +88 -54
- data/lib/fastlane/plugin/fivethree_ionic/helper/fivethree_ionic_helper.rb +2 -2
- data/lib/fastlane/plugin/fivethree_ionic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fc309bb77375e997a37abd093e18203e5d4555d61636a58c5a15f5811ff9fc2
|
4
|
+
data.tar.gz: 81223f8db8f5976567ea303fb1466db5aa02b4b5e342e41d4397db8b954283ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7d3ab1ff379843e8f7a98f97e9bc28f88da79d70c9acc0da765f1b53fc284f2c2bbe721eb8c978b746ed208e3c87ba90a22310f605023ea18dd649a61bf35a2
|
7
|
+
data.tar.gz: 9f3647d0b2421e3681c087e88bb3f8b892279363e9eef9064a9c487a8c111e683c091013c25925174bf4a583e39639a7c1ac77759935b9fead73056541c8c404
|
@@ -11,6 +11,4 @@ end
|
|
11
11
|
|
12
12
|
# By default we want to import all available actions and helpers
|
13
13
|
# A plugin can contain any number of actions and plugins
|
14
|
-
Fastlane::FivethreeIonic.all_classes.each
|
15
|
-
require current
|
16
|
-
end
|
14
|
+
Fastlane::FivethreeIonic.all_classes.each { |current| require current }
|
@@ -1,44 +1,50 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
module SharedValues
|
4
|
-
FIV_ADD_TRANSPARENT_STATUSBAR_CUSTOM_VALUE =
|
4
|
+
FIV_ADD_TRANSPARENT_STATUSBAR_CUSTOM_VALUE =
|
5
|
+
:ADD_TRANSPARENT_STATUSBAR_CUSTOM_VALUE
|
5
6
|
end
|
6
7
|
|
7
8
|
class FivAddTransparentStatusbarAction < Action
|
8
9
|
def self.run(params)
|
9
|
-
|
10
10
|
text = File.read(params[:path])
|
11
11
|
|
12
12
|
if params[:ios]
|
13
|
-
|
14
|
-
puts "platform is ios"
|
13
|
+
puts 'platform is ios'
|
15
14
|
|
16
15
|
/super.onCreate\(savedInstanceState\);/
|
17
16
|
|
18
|
-
new_contents =
|
17
|
+
new_contents =
|
18
|
+
text.gsub(
|
19
|
+
/{/,
|
20
|
+
"{\n [self.viewController.navigationController.navigationBar setBackgroundImage:[UIImage new]
|
19
21
|
\nforBarMetrics:UIBarMetricsDefault];
|
20
22
|
\nself.viewController.navigationController.navigationBar.shadowImage = [UIImage new];
|
21
23
|
\nself.viewController.navigationController.navigationBar.translucent = YES;
|
22
|
-
\nself.viewController.navigationController.view.backgroundColor = [UIColor clearColor];"
|
23
|
-
|
24
|
+
\nself.viewController.navigationController.view.backgroundColor = [UIColor clearColor];"
|
25
|
+
)
|
24
26
|
else
|
27
|
+
puts 'platform is android'
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
29
|
+
content =
|
30
|
+
text.gsub(
|
31
|
+
/super.onCreate\(savedInstanceState\);/,
|
32
|
+
'super.onCreate(savedInstanceState);
|
30
33
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
31
34
|
getWindow().getDecorView().setSystemUiVisibility(
|
32
35
|
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
33
36
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
34
|
-
}
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
}'
|
38
|
+
)
|
39
|
+
|
40
|
+
new_contents =
|
41
|
+
content.gsub(
|
42
|
+
/import org.apache.cordova.*;/,
|
43
|
+
"import org.apache.cordova.*;\nimport android.os.Build;\nimport android.view.View;"
|
44
|
+
)
|
39
45
|
end
|
40
46
|
|
41
|
-
File.open(params[:path],
|
47
|
+
File.open(params[:path], 'w') { |file| file.puts new_contents }
|
42
48
|
end
|
43
49
|
|
44
50
|
#####################################################
|
@@ -46,33 +52,43 @@ module Fastlane
|
|
46
52
|
#####################################################
|
47
53
|
|
48
54
|
def self.description
|
49
|
-
|
55
|
+
'A short description with <= 80 characters of what this action does'
|
50
56
|
end
|
51
57
|
|
52
58
|
def self.details
|
53
59
|
# Optional:
|
54
60
|
# this is your chance to provide a more detailed description of this action
|
55
|
-
|
61
|
+
'You can use this action to do cool things...'
|
56
62
|
end
|
57
63
|
|
58
64
|
def self.available_options
|
59
|
-
# Define all options your action supports.
|
60
|
-
|
65
|
+
# Define all options your action supports.
|
66
|
+
|
61
67
|
# Below a few examples
|
62
68
|
[
|
63
|
-
FastlaneCore::ConfigItem.new(
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
69
|
+
FastlaneCore::ConfigItem.new(
|
70
|
+
key: :ios,
|
71
|
+
env_name: 'FIV_ADD_TRANSPARENT_STATUSBAR_PLATFORM',
|
72
|
+
description: '---',
|
73
|
+
optional: false,
|
74
|
+
type: Boolean
|
75
|
+
),
|
76
|
+
FastlaneCore::ConfigItem.new(
|
77
|
+
key: :path,
|
78
|
+
env_name: 'FIV_ADD_TRANSPARENT_STATUSBAR_PATH',
|
79
|
+
description:
|
80
|
+
'Path to Appdelegate.m for ios and MainActivity.java for Android',
|
81
|
+
optional: false,
|
82
|
+
verify_block:
|
83
|
+
proc do |value|
|
84
|
+
unless File.exist?(value)
|
85
|
+
UI.user_error!(
|
86
|
+
'Couldnt find AppDelegate or Main Activity! Please change your path.'
|
87
|
+
)
|
88
|
+
end
|
89
|
+
end,
|
90
|
+
type: String
|
91
|
+
)
|
76
92
|
]
|
77
93
|
end
|
78
94
|
|
@@ -80,7 +96,10 @@ module Fastlane
|
|
80
96
|
# Define the shared values you are going to provide
|
81
97
|
# Example
|
82
98
|
[
|
83
|
-
[
|
99
|
+
[
|
100
|
+
'ADD_TRANSPARENT_STATUSBAR_CUSTOM_VALUE',
|
101
|
+
'A description of what this value contains'
|
102
|
+
]
|
84
103
|
]
|
85
104
|
end
|
86
105
|
|
@@ -90,18 +109,18 @@ module Fastlane
|
|
90
109
|
|
91
110
|
def self.authors
|
92
111
|
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
93
|
-
[
|
112
|
+
['Your GitHub/Twitter Name']
|
94
113
|
end
|
95
114
|
|
96
115
|
def self.is_supported?(platform)
|
97
116
|
# you can do things like
|
98
|
-
#
|
117
|
+
#
|
99
118
|
# true
|
100
|
-
#
|
119
|
+
#
|
101
120
|
# platform == :ios
|
102
|
-
#
|
121
|
+
#
|
103
122
|
# [:ios, :mac].include?(platform)
|
104
|
-
#
|
123
|
+
#
|
105
124
|
|
106
125
|
platform == :ios
|
107
126
|
end
|
@@ -8,62 +8,84 @@ module Fastlane
|
|
8
8
|
|
9
9
|
# Validating output doesn't exist yet for our android signing info
|
10
10
|
if File.directory?(keystore_path)
|
11
|
-
if File.exists?(keystore_file)
|
12
|
-
return keystore_file
|
13
|
-
end
|
11
|
+
return keystore_file if File.exists?(keystore_file)
|
14
12
|
else
|
15
|
-
UI.message
|
13
|
+
UI.message 'android keystore doesnt exist yet. creating one for you...'
|
16
14
|
Dir.mkdir keystore_path
|
17
15
|
end
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
puts 'Please enter the keystore password for new keystore with atleast 6 characters:'
|
18
|
+
keychain_entry =
|
19
|
+
CredentialsManager::AccountManager.new(
|
20
|
+
user: "#{keystore_name}_android_keystore_storepass"
|
21
|
+
)
|
22
22
|
password = keychain_entry.password
|
23
23
|
|
24
|
-
puts
|
25
|
-
keypass_entry =
|
24
|
+
puts 'Please enter the keystore password for new keystore atleast 6 characters:'
|
25
|
+
keypass_entry =
|
26
|
+
CredentialsManager::AccountManager.new(
|
27
|
+
user: "#{keystore_name}_android_keystore_keypass"
|
28
|
+
)
|
26
29
|
key_password = keypass_entry.password
|
27
30
|
|
28
31
|
alias_name = params[:key_alias]
|
29
32
|
puts "Keystore alias #{alias_name}"
|
30
33
|
|
31
|
-
full_name =
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
full_name =
|
35
|
+
Fastlane::Actions::PromptAction.run(text: 'Enter kexystore full name')
|
36
|
+
org = Fastlane::Actions::PromptAction.run(text: 'Enter kexystore org')
|
37
|
+
org_unit =
|
38
|
+
Fastlane::Actions::PromptAction.run(text: 'Enter kexystore org unit')
|
39
|
+
city_locality = Fastlane::Actions::PromptAction.run(text: 'Enter city')
|
40
|
+
state_province =
|
41
|
+
Fastlane::Actions::PromptAction.run(text: 'Enter state')
|
42
|
+
country = Fastlane::Actions::PromptAction.run(text: 'country')
|
43
|
+
|
38
44
|
# Create keystore with command
|
39
45
|
unless File.file?(keystore_file)
|
40
|
-
keytool =
|
41
|
-
|
42
|
-
-
|
46
|
+
keytool =
|
47
|
+
"keytool -genkey -v \
|
48
|
+
-keystore #{
|
49
|
+
keystore_file
|
50
|
+
} \
|
51
|
+
-alias #{
|
52
|
+
alias_name
|
53
|
+
} \
|
43
54
|
-keyalg RSA -keysize 2048 -validity 10000 \
|
44
|
-
-storepass #{
|
45
|
-
|
46
|
-
|
55
|
+
-storepass #{
|
56
|
+
password
|
57
|
+
} \
|
58
|
+
-keypass #{
|
59
|
+
key_password
|
60
|
+
} \
|
61
|
+
-dname \"CN=#{full_name}, OU=#{org_unit}, O=#{
|
62
|
+
org
|
63
|
+
}, L=#{city_locality}, S=#{state_province}, C=#{
|
64
|
+
country
|
65
|
+
}\"
|
47
66
|
"
|
48
67
|
sh keytool
|
49
68
|
else
|
50
69
|
UI.message "Keystore file already exists - #{keystore_file}"
|
51
70
|
end
|
52
|
-
|
71
|
+
|
53
72
|
# Create release-signing.properties for automatic signing with Ionic
|
54
|
-
release_signing_path =
|
55
|
-
|
73
|
+
release_signing_path =
|
74
|
+
File.join(keystore_path, 'release-signing.properties')
|
75
|
+
|
56
76
|
unless File.file?(release_signing_path)
|
57
|
-
out_file = File.new(release_signing_path,
|
77
|
+
out_file = File.new(release_signing_path, 'w')
|
58
78
|
out_file.puts("storeFile=#{keystore_name}")
|
59
79
|
out_file.puts("storePassword=#{password}")
|
60
80
|
out_file.puts("keyAlias=#{alias_name}")
|
61
81
|
out_file.puts("keyPassword=#{key_password}")
|
62
82
|
out_file.close
|
63
83
|
else
|
64
|
-
UI.message "release-signing.properties file already exists - #{
|
84
|
+
UI.message "release-signing.properties file already exists - #{
|
85
|
+
release_signing_path
|
86
|
+
}"
|
65
87
|
end
|
66
|
-
|
88
|
+
|
67
89
|
return keystore_file
|
68
90
|
end
|
69
91
|
|
@@ -72,49 +94,55 @@ module Fastlane
|
|
72
94
|
#####################################################
|
73
95
|
|
74
96
|
def self.description
|
75
|
-
|
97
|
+
'Generate an Android keystore file or validate keystore exists'
|
76
98
|
end
|
77
99
|
|
78
100
|
def self.details
|
79
|
-
|
101
|
+
'Generate an Android keystore file or validate keystore exists'
|
80
102
|
end
|
81
103
|
|
82
104
|
def self.available_options
|
83
105
|
[
|
84
106
|
FastlaneCore::ConfigItem.new(
|
85
107
|
key: :keystore_path,
|
86
|
-
env_name:
|
87
|
-
description:
|
108
|
+
env_name: 'FIV_KEYSTORE_PATH',
|
109
|
+
description: 'Path to android keystore',
|
88
110
|
is_string: true,
|
89
|
-
default_value:
|
111
|
+
default_value: './fastlane/android'
|
112
|
+
),
|
90
113
|
FastlaneCore::ConfigItem.new(
|
91
114
|
key: :keystore_name,
|
92
|
-
env_name:
|
93
|
-
description:
|
115
|
+
env_name: 'FIV_KEYSTORE_NAME',
|
116
|
+
description: 'Name of the keystore',
|
94
117
|
is_string: true,
|
95
|
-
optional: false
|
118
|
+
optional: false
|
119
|
+
),
|
96
120
|
FastlaneCore::ConfigItem.new(
|
97
121
|
key: :key_alias,
|
98
|
-
env_name:
|
99
|
-
description:
|
122
|
+
env_name: 'FIV_ANDROID_KEYSTORE_ALIAS',
|
123
|
+
description: 'Key alias of the keystore',
|
100
124
|
is_string: true,
|
101
|
-
optional: false
|
125
|
+
optional: false
|
126
|
+
)
|
102
127
|
]
|
103
128
|
end
|
104
129
|
|
105
130
|
def self.output
|
106
131
|
[
|
107
132
|
['ANDROID_KEYSTORE_KEYSTORE_PATH', 'Path to keystore'],
|
108
|
-
[
|
133
|
+
[
|
134
|
+
'ANDROID_KEYSTORE_RELEASE_SIGNING_PATH',
|
135
|
+
'Path to release-signing.properties'
|
136
|
+
]
|
109
137
|
]
|
110
138
|
end
|
111
139
|
|
112
140
|
def self.return_value
|
113
|
-
|
141
|
+
'Path to keystore'
|
114
142
|
end
|
115
143
|
|
116
144
|
def self.authors
|
117
|
-
[
|
145
|
+
%w[fivethree]
|
118
146
|
end
|
119
147
|
|
120
148
|
def self.is_supported?(platform)
|
@@ -1,16 +1,17 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
module SharedValues
|
4
|
-
FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE =
|
4
|
+
FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE =
|
5
|
+
:FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE
|
5
6
|
end
|
6
7
|
|
7
8
|
class FivBuildIonicAndroidAction < Action
|
8
9
|
def self.run(params)
|
9
10
|
isProd = params[:isProd]
|
10
11
|
if (isProd)
|
11
|
-
sh
|
12
|
+
sh 'ionic cordova build android --prod'
|
12
13
|
else
|
13
|
-
sh
|
14
|
+
sh 'ionic cordova build android'
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
@@ -19,25 +20,27 @@ module Fastlane
|
|
19
20
|
#####################################################
|
20
21
|
|
21
22
|
def self.description
|
22
|
-
|
23
|
+
'A short description with <= 80 characters of what this action does'
|
23
24
|
end
|
24
25
|
|
25
26
|
def self.details
|
26
27
|
# Optional:
|
27
28
|
# this is your chance to provide a more detailed description of this action
|
28
|
-
|
29
|
+
'You can use this action to do cool things...'
|
29
30
|
end
|
30
31
|
|
31
32
|
def self.available_options
|
32
|
-
# Define all options your action supports.
|
33
|
-
|
33
|
+
# Define all options your action supports.
|
34
|
+
|
34
35
|
# Below a few examples
|
35
36
|
[
|
36
|
-
FastlaneCore::ConfigItem.new(
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
FastlaneCore::ConfigItem.new(
|
38
|
+
key: :isProd,
|
39
|
+
env_name: 'FIV_BUILD_IONIC_ANDROID_IS_PROD',
|
40
|
+
description: 'Dev or Prod build',
|
41
|
+
optional: false,
|
42
|
+
type: Boolean
|
43
|
+
)
|
41
44
|
]
|
42
45
|
end
|
43
46
|
|
@@ -45,7 +48,10 @@ module Fastlane
|
|
45
48
|
# Define the shared values you are going to provide
|
46
49
|
# Example
|
47
50
|
[
|
48
|
-
[
|
51
|
+
[
|
52
|
+
'FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE',
|
53
|
+
'A description of what this value contains'
|
54
|
+
]
|
49
55
|
]
|
50
56
|
end
|
51
57
|
|
@@ -55,11 +61,11 @@ module Fastlane
|
|
55
61
|
|
56
62
|
def self.authors
|
57
63
|
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
58
|
-
[
|
64
|
+
['Your GitHub/Twitter Name']
|
59
65
|
end
|
60
66
|
|
61
67
|
def self.is_supported?(platform)
|
62
|
-
|
68
|
+
platform == :android
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|