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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9db80fa0b8501de5dc57cfd81094eb31488fdd30b4ffa2bd82ba387aa6c06800
4
- data.tar.gz: 26c8de6bfcd381818521f6e03d40b5f4ed8710fb44b45f9aeec80e8f7796d6ae
3
+ metadata.gz: 7fc309bb77375e997a37abd093e18203e5d4555d61636a58c5a15f5811ff9fc2
4
+ data.tar.gz: 81223f8db8f5976567ea303fb1466db5aa02b4b5e342e41d4397db8b954283ec
5
5
  SHA512:
6
- metadata.gz: 733488c38bf37fa7e228f31786b49d56263f0672d6ae7e493f50198634ef06ac6c895d5e209b027a395c52d4089ade28516b942eb0df7b797996303cea72305c
7
- data.tar.gz: 55e00ef0237591c8fcf5e041b9ec27a0c7caa83f676773f58f055bab38a4e1cee5372a60b76212caee5c8545256bd7bda2f8fbc7f07adc7ae6608c8967bf0d77
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 do |current|
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 = :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 = text.gsub(/{/, "{\n [self.viewController.navigationController.navigationBar setBackgroundImage:[UIImage new]
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
- puts "platform is android"
27
-
28
- content = text.gsub(/super.onCreate\(savedInstanceState\);/,
29
- "super.onCreate(savedInstanceState);
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
- new_contents = content.gsub(/import org.apache.cordova.*;/,
37
- "import org.apache.cordova.*;\nimport android.os.Build;\nimport android.view.View;")
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], "w") {|file| file.puts new_contents}
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
- "A short description with <= 80 characters of what this action does"
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
- "You can use this action to do cool things..."
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(key: :ios,
64
- env_name: "FIV_ADD_TRANSPARENT_STATUSBAR_PLATFORM",
65
- description: "---",
66
- optional: false,
67
- type: Boolean),
68
- FastlaneCore::ConfigItem.new(key: :path,
69
- env_name: "FIV_ADD_TRANSPARENT_STATUSBAR_PATH",
70
- description: "Path to Appdelegate.m for ios and MainActivity.java for Android",
71
- optional: false,
72
- verify_block: proc do | value |
73
- UI.user_error!("Couldnt find AppDelegate or Main Activity! Please change your path.") unless File.exist?(value)
74
- end ,
75
- type: String)
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
- ['ADD_TRANSPARENT_STATUSBAR_CUSTOM_VALUE', 'A description of what this value contains']
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
- ["Your GitHub/Twitter Name"]
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 "android keystore doesnt exist yet. creating one for you..."
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
- 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")
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 "Please enter the keystore password for new keystore atleast 6 characters:"
25
- keypass_entry = CredentialsManager::AccountManager.new(user: "#{keystore_name}_android_keystore_keypass")
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 = 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
-
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 = "keytool -genkey -v \
41
- -keystore #{keystore_file} \
42
- -alias #{alias_name} \
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 #{password} \
45
- -keypass #{key_password} \
46
- -dname \"CN=#{full_name}, OU=#{org_unit}, O=#{org}, L=#{city_locality}, S=#{state_province}, C=#{country}\"
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 = File.join(keystore_path, "release-signing.properties")
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, "w")
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 - #{release_signing_path}"
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
- "Generate an Android keystore file or validate keystore exists"
97
+ 'Generate an Android keystore file or validate keystore exists'
76
98
  end
77
99
 
78
100
  def self.details
79
- "Generate an Android keystore file or validate keystore exists"
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: "FIV_KEYSTORE_PATH",
87
- description: "Path to android keystore",
108
+ env_name: 'FIV_KEYSTORE_PATH',
109
+ description: 'Path to android keystore',
88
110
  is_string: true,
89
- default_value: "./fastlane/android"),
111
+ default_value: './fastlane/android'
112
+ ),
90
113
  FastlaneCore::ConfigItem.new(
91
114
  key: :keystore_name,
92
- env_name: "FIV_KEYSTORE_NAME",
93
- description: "Name of the keystore",
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: "FIV_ANDROID_KEYSTORE_ALIAS",
99
- description: "Key alias of the keystore",
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
- ['ANDROID_KEYSTORE_RELEASE_SIGNING_PATH', 'Path to release-signing.properties']
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
- "Path to keystore"
141
+ 'Path to keystore'
114
142
  end
115
143
 
116
144
  def self.authors
117
- ["fivethree"]
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 = :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 "ionic cordova build android --prod"
12
+ sh 'ionic cordova build android --prod'
12
13
  else
13
- sh "ionic cordova build android"
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
- "A short description with <= 80 characters of what this action does"
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
- "You can use this action to do cool things..."
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(key: :isProd,
37
- env_name: "FIV_BUILD_IONIC_ANDROID_IS_PROD",
38
- description: "Dev or Prod build",
39
- optional: false,
40
- type: Boolean)
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
- ['FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE', 'A description of what this value contains']
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
- ["Your GitHub/Twitter Name"]
64
+ ['Your GitHub/Twitter Name']
59
65
  end
60
66
 
61
67
  def self.is_supported?(platform)
62
- platform == :android
68
+ platform == :android
63
69
  end
64
70
  end
65
71
  end