fastlane-plugin-sous 0.1.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 +7 -0
- data/LICENSE +21 -0
- data/README.md +56 -0
- data/lib/fastlane/plugin/sous.rb +16 -0
- data/lib/fastlane/plugin/sous/actions/pass_action.rb +241 -0
- data/lib/fastlane/plugin/sous/actions/plate_action.rb +144 -0
- data/lib/fastlane/plugin/sous/helper/sous_helper.rb +15 -0
- data/lib/fastlane/plugin/sous/version.rb +5 -0
- metadata +176 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f4106c4a2457aa6d1e78a2e35a064ff34a199e6d0a335cec2f5d5254a720d5c8
|
4
|
+
data.tar.gz: 72db785a94ea3068d9edf1a1530c03c001a1cc48fceba149b170ea949662bb14
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b14bba76e1f8b10c6340c005eb881fe7ccbd2e1c06f947a1d8eb241f8386b5e55a6f7392b7571db84f35be44b45fb0692ec75bd6914f8b9e4b71688338f69f11
|
7
|
+
data.tar.gz: 579cd49a419e3841ff703db51c71931cf2943506a190447143a226a4c4fad02c6d5c61c1dc50bcda5acddfd1a946a4ff60565e3e21eca5b9f42ec3dfa81f422a
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Jonathan Nogueira <jontnog@gmail.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# sous plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-sous)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-sous`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin sous
|
11
|
+
```
|
12
|
+
|
13
|
+
## About sous
|
14
|
+
|
15
|
+
A tool to help create and sync keystores, as well as sign apks and aabs for the play store
|
16
|
+
|
17
|
+
## How to use
|
18
|
+
|
19
|
+
Use `prep` to create a keystore and send it to a git repository for `pass` to use.
|
20
|
+
|
21
|
+
Use `pass` to pull and decrypt existing keystores from a repository.
|
22
|
+
|
23
|
+
Use `plate` to sign an APK, can also align the apk.
|
24
|
+
|
25
|
+
## Example
|
26
|
+
|
27
|
+
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`. (Warning- this is a work in progress and the fastfile will not execute yet)
|
28
|
+
|
29
|
+
## Run tests for this plugin
|
30
|
+
|
31
|
+
To run both the tests, and code style validation, run
|
32
|
+
|
33
|
+
```
|
34
|
+
rake
|
35
|
+
```
|
36
|
+
|
37
|
+
To automatically fix many of the styling issues, use
|
38
|
+
```
|
39
|
+
rubocop -a
|
40
|
+
```
|
41
|
+
|
42
|
+
## Issues and Feedback
|
43
|
+
|
44
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
45
|
+
|
46
|
+
## Troubleshooting
|
47
|
+
|
48
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
49
|
+
|
50
|
+
## Using _fastlane_ Plugins
|
51
|
+
|
52
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
53
|
+
|
54
|
+
## About _fastlane_
|
55
|
+
|
56
|
+
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/sous/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Sous
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::Sous.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,241 @@
|
|
1
|
+
## Based strongly on the work done at https://github.com/christopherney/fastlane-plugin-match_keystore/blob/master/lib/fastlane/plugin/match_keystore/actions/match_keystore_action.rb
|
2
|
+
|
3
|
+
require 'digest'
|
4
|
+
require 'openssl'
|
5
|
+
require 'git'
|
6
|
+
|
7
|
+
module Fastlane
|
8
|
+
module Actions
|
9
|
+
module SharedValues
|
10
|
+
KEYSTORE_PATH = :KEYSTORE_PATH
|
11
|
+
end
|
12
|
+
|
13
|
+
class PassAction < Action
|
14
|
+
def self.run(params)
|
15
|
+
# input params:
|
16
|
+
git_url = params[:git_url]
|
17
|
+
git_branch = params[:git_branch]
|
18
|
+
package_name = params[:package_name]
|
19
|
+
existing_keystore = params[:existing_keystore]
|
20
|
+
match_secret = params[:match_secret]
|
21
|
+
keystore_data = params[:keystore_data]
|
22
|
+
|
23
|
+
# constants:
|
24
|
+
keystore_name = package_name + ".jks"
|
25
|
+
keystore_encrypt_name = package_name + ".jks.enc"
|
26
|
+
|
27
|
+
# Check Android Home Env:
|
28
|
+
android_home = Helper::SousHelper.get_android_home
|
29
|
+
if android_home.to_s.strip.empty?
|
30
|
+
raise "The Android SDK is not installed or the environment variable ANDROID_HOME is not defined "
|
31
|
+
else
|
32
|
+
UI.message("Android SDK: #{android_home}")
|
33
|
+
end
|
34
|
+
|
35
|
+
# Check OpenSSL:
|
36
|
+
self.check_openssl_version
|
37
|
+
|
38
|
+
# Init working local directory:
|
39
|
+
dir_name = File.join(File.absolute_path(ENV['HOME']), '.sous')
|
40
|
+
unless File.directory?(dir_name)
|
41
|
+
UI.message("Creating '.sous' working directory...")
|
42
|
+
FileUtils.mkdir_p(dir_name)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Init 'security password' for AES encryption:
|
46
|
+
key_name = "#{self.to_md5(git_url)}.hex"
|
47
|
+
key_path = File.join(dir_name, key_name)
|
48
|
+
unless File.file?(key_path)
|
49
|
+
security_password = self.prompt(text: "Security password: ", secure_text: true, ci_input: match_secret)
|
50
|
+
if security_password.to_s.strip.empty?
|
51
|
+
raise "Security password is not defined! Please use 'match_secret' parameter"
|
52
|
+
end
|
53
|
+
UI.message "Generating security key '#{key_name}'..."
|
54
|
+
self.gen_key(key_path, security_password)
|
55
|
+
end
|
56
|
+
|
57
|
+
# check if password is well initialized
|
58
|
+
tmpkey = self.get_file_content(key_path).strip
|
59
|
+
if tmpkey.length == 128
|
60
|
+
UI.message "Security key '#{key_name}' initialized"
|
61
|
+
else
|
62
|
+
raise "The security key '#{key_name}' is malformed, or not initialized!"
|
63
|
+
end
|
64
|
+
|
65
|
+
# create repo directory to sync remote keystores
|
66
|
+
repo_dir = File.join(dir_name, self.to_md5(git_url))
|
67
|
+
unless File.directory?(repo_dir)
|
68
|
+
UI.message("Creating Keystore directory...")
|
69
|
+
UI.message("Directory: #{repo_dir}")
|
70
|
+
FileUtils.mkdir_p(repo_dir)
|
71
|
+
end
|
72
|
+
|
73
|
+
# cloning/pulling git remote repo
|
74
|
+
gitDir = File.join(repo_dir, '/.git')
|
75
|
+
if !File.directory?(gitDir)
|
76
|
+
UI.message("Cloning remote Keystores repository...")
|
77
|
+
self.git_clone(git_url, git_branch, self.to_md5(git_url), dir_name)
|
78
|
+
else
|
79
|
+
UI.message("Pulling remote Keystores repository...#{git_branch}")
|
80
|
+
self.git_pull(repo_dir, git_branch)
|
81
|
+
end
|
82
|
+
|
83
|
+
# create sub-directory for android app
|
84
|
+
if package_name.to_s.strip.empty?
|
85
|
+
raise "Package name is not defined!"
|
86
|
+
end
|
87
|
+
keystoreAppDir = File.join(repo_dir, "android")
|
88
|
+
keystore_path = File.join(keystoreAppDir, keystore_name)
|
89
|
+
keystore_encrypt_path = File.join(keystoreAppDir, keystore_encrypt_name)
|
90
|
+
|
91
|
+
unless File.file?(keystore_encrypt_path)
|
92
|
+
raise "Cannot find encrypted keystore at path: #{keystore_encrypt_path}. Please make sure you have run `prep` at least once and that the keystore is uploaded to your store."
|
93
|
+
else
|
94
|
+
self.decrypt_file(keystore_encrypt_path, keystore_path, key_path)
|
95
|
+
end
|
96
|
+
|
97
|
+
Actions.lane_context[SharedValues::KEYSTORE_PATH] = keystore_path
|
98
|
+
|
99
|
+
keystore_path
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.git_clone(git_url, git_branch, repo_name, repo_dir)
|
104
|
+
Git.clone(git_url, repo_name, :path => repo_dir, :branch => git_branch)
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.git_pull(repo_dir, git_branch)
|
108
|
+
g = Git.open(repo_dir)
|
109
|
+
g.fetch
|
110
|
+
g.checkout("origin/" + git_branch, :force => true)
|
111
|
+
g.pull("origin", git_branch)
|
112
|
+
end
|
113
|
+
|
114
|
+
def self.to_md5(value)
|
115
|
+
hash_value = Digest::MD5.hexdigest value
|
116
|
+
hash_value
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.check_openssl_version
|
120
|
+
output = `openssl version`
|
121
|
+
if !output.start_with?("OpenSSL")
|
122
|
+
raise "Please install OpenSSL at least version 1.1.1 https://www.openssl.org/"
|
123
|
+
end
|
124
|
+
UI.message("OpenSSL v
|
125
|
+
ersion: " + output.strip)
|
126
|
+
end
|
127
|
+
|
128
|
+
def self.prompt(params)
|
129
|
+
if params[:value].to_s.empty?
|
130
|
+
return_value = other_action.prompt(text: params[:text], secure_text: params[:secure_text], ci_input: params[:ci_input])
|
131
|
+
else
|
132
|
+
return_value = params[:value]
|
133
|
+
end
|
134
|
+
return_value
|
135
|
+
end
|
136
|
+
|
137
|
+
def self.get_file_content(file_path)
|
138
|
+
data = File.read(file_path)
|
139
|
+
data
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.decrypt_file(encrypt_file, clear_file, key_path)
|
143
|
+
if File.exist?(clear_file)
|
144
|
+
File.delete(clear_file)
|
145
|
+
end
|
146
|
+
# TODO: Change this to use the actual openssl library instead of a shell command
|
147
|
+
sh("openssl enc -d -aes-256-cbc -pbkdf2 -in \"#{encrypt_file}\" -out \"#{clear_file}\" -pass file:\"#{key_path}\"")
|
148
|
+
end
|
149
|
+
|
150
|
+
def self.gen_key(key_path, password)
|
151
|
+
if File.exist?(key_path)
|
152
|
+
File.delete(key_path)
|
153
|
+
end
|
154
|
+
digest = Digest::SHA512.hexdigest(password)
|
155
|
+
File.open(key_path, "w") do |f|
|
156
|
+
f << digest
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
def self.available_options
|
161
|
+
[
|
162
|
+
FastlaneCore::ConfigItem.new(key: :git_url,
|
163
|
+
env_name: "SOUS_GIT_URL",
|
164
|
+
description: "URL to the git repo containing the android secrets",
|
165
|
+
is_string: true,
|
166
|
+
verify_block: proc do |value|
|
167
|
+
UI.user_error!("No Android Secrets Git Url given, pass using `git_url: 'url_location'`") unless (value and not value.empty?)
|
168
|
+
end),
|
169
|
+
FastlaneCore::ConfigItem.new(key: :git_branch,
|
170
|
+
env_name: "SOUS_GIT_BRANCH",
|
171
|
+
description: "Specific git branch to use",
|
172
|
+
is_string: true,
|
173
|
+
default_value: "master"),
|
174
|
+
FastlaneCore::ConfigItem.new(key: :match_secret,
|
175
|
+
env_name: "SOUS_MATCH_PASSWORD",
|
176
|
+
description: "Passphrase used to encrypt secrets",
|
177
|
+
is_string: true,
|
178
|
+
optional: true),
|
179
|
+
FastlaneCore::ConfigItem.new(key: :package_name,
|
180
|
+
env_name: "SOUS_PACKAGE_NAME",
|
181
|
+
description: "The package name of the App",
|
182
|
+
is_string: true,
|
183
|
+
verify_block: proc do |value|
|
184
|
+
UI.user_error!("No Android Package Name given, pass using `package_name: 'package_name'`") unless (value and not value.empty?)
|
185
|
+
end),
|
186
|
+
FastlaneCore::ConfigItem.new(key: :existing_keystore,
|
187
|
+
env_name: "SOUS_KEYSTORE",
|
188
|
+
description: "Path of an existing Keystore",
|
189
|
+
is_string: true,
|
190
|
+
optional: true),
|
191
|
+
FastlaneCore::ConfigItem.new(key: :keystore_data,
|
192
|
+
env_name: "SOUS_JSON_PATH",
|
193
|
+
description: "Required data to import an existing keystore, or create a new one",
|
194
|
+
is_string: true,
|
195
|
+
optional: true),
|
196
|
+
FastlaneCore::ConfigItem.new(key: :key_password,
|
197
|
+
env_name: "SOUS_KEY_PASSWORD",
|
198
|
+
description: "Keystore Password",
|
199
|
+
is_string: true,
|
200
|
+
optional: true),
|
201
|
+
FastlaneCore::ConfigItem.new(key: :alias_name,
|
202
|
+
env_name: "SOUS_ALIAS_NAME",
|
203
|
+
description: "Keystore Alias name",
|
204
|
+
is_string: true,
|
205
|
+
optional: true),
|
206
|
+
FastlaneCore::ConfigItem.new(key: :alias_password,
|
207
|
+
env_name: "SOUS_ALIAS_PASSWORD",
|
208
|
+
description: "Keystore Alias password",
|
209
|
+
is_string: true,
|
210
|
+
optional: true)
|
211
|
+
]
|
212
|
+
end
|
213
|
+
|
214
|
+
#####################################################
|
215
|
+
# @!group Documentation
|
216
|
+
#####################################################
|
217
|
+
|
218
|
+
def self.description
|
219
|
+
"This action retrieves existing keystores for the android build system"
|
220
|
+
end
|
221
|
+
|
222
|
+
def self.details
|
223
|
+
"You can use this action to pull the upload and signing keystores for android."
|
224
|
+
end
|
225
|
+
|
226
|
+
def self.output
|
227
|
+
[
|
228
|
+
['KEYSTORE_PATH', 'The path to the synced keystore file']
|
229
|
+
]
|
230
|
+
end
|
231
|
+
|
232
|
+
def self.authors
|
233
|
+
["Jonathan Nogueira"]
|
234
|
+
end
|
235
|
+
|
236
|
+
def self.is_supported?(platform)
|
237
|
+
platform == :android
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
module SharedValues
|
4
|
+
SIGNED_APK_PATH = :SIGNED_APK_PATH
|
5
|
+
end
|
6
|
+
|
7
|
+
class PlateAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
apk_path = params[:apk_path]
|
10
|
+
keystore_path = params[:keystore_path]
|
11
|
+
key_password = params[:key_password]
|
12
|
+
alias_name = params[:alias_name]
|
13
|
+
alias_password = params[:alias_password]
|
14
|
+
zip_align = params[:zip_align]
|
15
|
+
|
16
|
+
UI.message "Signing APK #{apk_path}..."
|
17
|
+
apk_path = self.sign_apk(
|
18
|
+
apk_path: apk_path,
|
19
|
+
keystore_path: keystore_path,
|
20
|
+
key_password: key_password,
|
21
|
+
alias_name: alias_name,
|
22
|
+
alias_password: alias_password,
|
23
|
+
zip_align: zip_align)
|
24
|
+
|
25
|
+
Actions.lane_context[SharedValues::KEYSTORE_PATH] = apk_path
|
26
|
+
|
27
|
+
apk_path
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.sign_apk(apk_path:, keystore_path:, key_password:, alias_name:, alias_password:, zip_align:)
|
31
|
+
|
32
|
+
build_tools_path = self.get_build_tools()
|
33
|
+
|
34
|
+
# https://developer.android.com/studio/command-line/zipalign
|
35
|
+
if zip_align == true
|
36
|
+
apk_path_aligned = apk_path.gsub(".apk", "-aligned.apk")
|
37
|
+
if File.exist?(apk_path_aligned)
|
38
|
+
File.delete(apk_path_aligned)
|
39
|
+
end
|
40
|
+
sh("#{build_tools_path}zipalign 4 \"#{apk_path}\" \"#{apk_path_aligned}\"")
|
41
|
+
else
|
42
|
+
apk_path_aligned = apk_path
|
43
|
+
end
|
44
|
+
apk_path_signed = apk_path.gsub(".apk", "-signed.apk")
|
45
|
+
apk_path_signed = apk_path_signed.gsub("unsigned", "")
|
46
|
+
apk_path_signed = apk_path_signed.gsub("--", "-")
|
47
|
+
|
48
|
+
# https://developer.android.com/studio/command-line/apksigner
|
49
|
+
if File.exist?(apk_path_signed)
|
50
|
+
File.delete(apk_path_signed)
|
51
|
+
end
|
52
|
+
sh("#{build_tools_path}apksigner sign --ks \"#{keystore_path}\" --ks-pass pass:\"#{key_password}\" --v1-signing-enabled true --v2-signing-enabled true --out \"#{apk_path_signed}\" \"#{apk_path_aligned}\"")
|
53
|
+
|
54
|
+
sh("#{build_tools_path}apksigner verify \"#{apk_path_signed}\"")
|
55
|
+
if File.exist?(apk_path_aligned)
|
56
|
+
File.delete(apk_path_aligned)
|
57
|
+
end
|
58
|
+
|
59
|
+
apk_path_signed
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.get_build_tools
|
63
|
+
android_home = Helper::SousHelper.get_android_home
|
64
|
+
build_tools_root = File.join(android_home, '/build-tools')
|
65
|
+
|
66
|
+
sub_dirs = Dir.glob(File.join(build_tools_root, '*', ''))
|
67
|
+
build_tools_last_version = ''
|
68
|
+
for sub_dir in sub_dirs
|
69
|
+
build_tools_last_version = sub_dir
|
70
|
+
end
|
71
|
+
|
72
|
+
build_tools_last_version
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.available_options
|
76
|
+
[
|
77
|
+
FastlaneCore::ConfigItem.new(key: :apk_path,
|
78
|
+
env_name: "SOUS_APK_PATH",
|
79
|
+
description: "Path to the APK File",
|
80
|
+
is_string: true,
|
81
|
+
verify_block: proc do |value|
|
82
|
+
UI.user_error!("No APK Path given, pass using `apk_path: 'path to apk'`") unless (value and not value.empty?)
|
83
|
+
end),
|
84
|
+
FastlaneCore::ConfigItem.new(key: :keystore_path,
|
85
|
+
env_name: "SOUS_KEYSTORE_PATH",
|
86
|
+
description: "Path to the Keystore file to sign APKs",
|
87
|
+
is_string: true,
|
88
|
+
verify_block: proc do |value|
|
89
|
+
UI.user_error!("Keystore path is not present, pass using `keystore_path: 'path to keystore'`") unless (value and not value.empty?)
|
90
|
+
end),
|
91
|
+
FastlaneCore::ConfigItem.new(key: :key_password,
|
92
|
+
env_name: "SOUS_KEY_PASSWORD",
|
93
|
+
description: "Signing Keystore password",
|
94
|
+
is_string: true,
|
95
|
+
verify_block: proc do |value|
|
96
|
+
UI.user_error!("No Keystore password given, pass using `key_password: 'password'`") unless (value and not value.empty?)
|
97
|
+
end),
|
98
|
+
FastlaneCore::ConfigItem.new(key: :alias_name,
|
99
|
+
env_name: "SOUS_ALIAS_NAME",
|
100
|
+
description: "Keystore Alias name",
|
101
|
+
is_string: true,
|
102
|
+
optional: true),
|
103
|
+
FastlaneCore::ConfigItem.new(key: :alias_password,
|
104
|
+
env_name: "SOUS_ALIAS_PASSWORD",
|
105
|
+
description: "URL to the git repo containing the android secrets",
|
106
|
+
is_string: true,
|
107
|
+
optional: true),
|
108
|
+
FastlaneCore::ConfigItem.new(key: :zip_align,
|
109
|
+
env_name: "SOUS_ZIP_ALIGN",
|
110
|
+
description: "Whether to specifically zip align the apk before signing",
|
111
|
+
is_string: false,
|
112
|
+
optional: true,
|
113
|
+
default_value: false)
|
114
|
+
]
|
115
|
+
end
|
116
|
+
|
117
|
+
#####################################################
|
118
|
+
# @!group Documentation
|
119
|
+
#####################################################
|
120
|
+
|
121
|
+
def self.description
|
122
|
+
"This action signs apks using an existing keystore"
|
123
|
+
end
|
124
|
+
|
125
|
+
def self.details
|
126
|
+
"You can use this action to sign APKs"
|
127
|
+
end
|
128
|
+
|
129
|
+
def self.output
|
130
|
+
[
|
131
|
+
['SIGNED_APK_PATH', 'The path to the signed apk file']
|
132
|
+
]
|
133
|
+
end
|
134
|
+
|
135
|
+
def self.authors
|
136
|
+
["Jonathan Nogueira"]
|
137
|
+
end
|
138
|
+
|
139
|
+
def self.is_supported?(platform)
|
140
|
+
platform == :android
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
|
5
|
+
|
6
|
+
module Helper
|
7
|
+
class SousHelper
|
8
|
+
|
9
|
+
def self.get_android_home
|
10
|
+
android_home = File.absolute_path(ENV["ANDROID_HOME"])
|
11
|
+
android_home
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,176 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-sous
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jonathan Nogueira
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pry
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec_junit_formatter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.49.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.49.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-require_tools
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: fastlane
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.156.1
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.156.1
|
139
|
+
description:
|
140
|
+
email:
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- LICENSE
|
146
|
+
- README.md
|
147
|
+
- lib/fastlane/plugin/sous.rb
|
148
|
+
- lib/fastlane/plugin/sous/actions/pass_action.rb
|
149
|
+
- lib/fastlane/plugin/sous/actions/plate_action.rb
|
150
|
+
- lib/fastlane/plugin/sous/helper/sous_helper.rb
|
151
|
+
- lib/fastlane/plugin/sous/version.rb
|
152
|
+
homepage: https://github.com/LuminousPath/fastlane-plugin-sous
|
153
|
+
licenses:
|
154
|
+
- MIT
|
155
|
+
metadata: {}
|
156
|
+
post_install_message:
|
157
|
+
rdoc_options: []
|
158
|
+
require_paths:
|
159
|
+
- lib
|
160
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
requirements: []
|
171
|
+
rubygems_version: 3.1.2
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: A tool to help create and sync keystores, as well as sign apks and aabs for
|
175
|
+
the play store
|
176
|
+
test_files: []
|