fastlane-plugin-appsigner 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88c63ecf2e1224b80ad62554e58db06b0d1172c5d83e1a4eb59cf88848086500
4
- data.tar.gz: 5e02d6209bc409b939ca34cf4b298adec419caaf0bdec481ec0b9916fbcad3c0
3
+ metadata.gz: c5c6c2bc467591891f8b782535a1cfa0e249d5d6447f555e3eed7cf13440a320
4
+ data.tar.gz: e67d1e28a08e1bfade33b4e043f9dff7bd8f2c8e641ddca95f559d2234ba426e
5
5
  SHA512:
6
- metadata.gz: fa5aa2726f65aa4257fef3dc95d6ef44a3c5aa1c708c236b920be12559ff189c1dfd487097d16cc599659d5d71c06d93b489c6930a7bb0248d96db820053c252
7
- data.tar.gz: 0d9a5c1fb3e53a556c60fda306d1433275103a5f5cb1f36f3902f321c441f45e382681442c1d3f0e0b8ec55c1281e165bace0b8612acc1f5a4a9dd03e26b28c6
6
+ metadata.gz: ffc69dd1010be413e44133389ff94cf349b3814fc150f61f36372b109ff6de49d8ed42302cf21d2e3c2128bbc07b3ef009a691aab103e5f47549b95f48dcb3c6
7
+ data.tar.gz: 610a1facd5c19ade2ef759aaa5a96d0bb5f983749caa530ce2bde57d1e2366b92283479ca80c2b60387f7b8c128456168367f619b3aec58de3261774ff70cd09
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # appsigner plugin
1
+ # AppSigner plugin
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-appsigner)
4
4
 
@@ -10,11 +10,20 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
10
  fastlane add_plugin appsigner
11
11
  ```
12
12
 
13
- ## About appsigner
13
+ ## About AppSigner
14
14
 
15
15
  AppSigner
16
+ Plugin for easier sign apk/aab file by AppSigner
17
+
18
+ ## Options
19
+
20
+ | Key | Description | Env Var | Default |
21
+ |-------------|---------------------------|-----------------------|--------------|
22
+ | domain | AppSigner domain | APPSIGNER_DOMAIN | |
23
+ | secret_key | Secret key from AppSigner | APPSIGNER_SECRET_KEY | |
24
+ | input_file | The path to apk/aab | APPSIGNER_INPUT_FILE | |
25
+ | output_file | Path for output | APPSIGNER_OUTPUT_FILE | `input_file` |
16
26
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
18
27
 
19
28
  ## Example
20
29
 
@@ -8,11 +8,11 @@ module Fastlane
8
8
 
9
9
  header = {
10
10
  'X-SIGNER-SECRET': params[:secret_key],
11
- 'Content-Disposition': 'inline; filename="%s"' % File.basename(params[:apk_path]),
11
+ 'Content-Disposition': 'inline; filename="%s"' % File.basename(params[:input_file]),
12
12
  'Content-Type': 'application/octet-stream'
13
13
  }
14
14
  request = Net::HTTP::Post.new(uri.request_uri, header)
15
- request.body = File.read(params[:apk_path])
15
+ request.body = File.read(params[:input_file])
16
16
  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
17
17
  http.request(request)
18
18
  end
@@ -21,7 +21,8 @@ module Fastlane
21
21
  print("response.body = %s\n" % response.body)
22
22
  raise response.error!
23
23
  end
24
- open(params[:apk_path], "wb") do |file|
24
+ output_file = params[:output_file] || params[:input_file]
25
+ open(output_file, "wb") do |file|
25
26
  file.write(response.body)
26
27
  end
27
28
  end
@@ -56,13 +57,21 @@ module Fastlane
56
57
  verify_block: proc do |value|
57
58
  UI.user_error!("No secret_key") if value.to_s.length == 0
58
59
  end),
59
- FastlaneCore::ConfigItem.new(key: :apk_path,
60
- env_name: "APPSIGNER_APK_PATH",
61
- description: "The path to your apk for sign",
60
+ FastlaneCore::ConfigItem.new(key: :input_file,
61
+ env_name: "APPSIGNER_INPUT_FILE",
62
+ description: "The path to your apk/aab for sign",
62
63
  optional: false,
63
64
  type: String,
64
65
  verify_block: proc do |value|
65
- UI.user_error!("No apk_path") if value.to_s.length == 0
66
+ UI.user_error!("No input_file") if value.to_s.length == 0
67
+ end),
68
+ FastlaneCore::ConfigItem.new(key: :output_file,
69
+ env_name: "APPSIGNER_OUTPUT_FILE",
70
+ description: "Output apk/aab file. If you don't specify params, the plugin will override input file",
71
+ optional: true,
72
+ type: String,
73
+ verify_block: proc do |value|
74
+ UI.user_error!("No output_file") if value.to_s.length == 0
66
75
  end)
67
76
  ]
68
77
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Appsigner
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-appsigner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valeriy Makarshin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-02 00:00:00.000000000 Z
11
+ date: 2020-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry