fastlane-plugin-appsigner 0.1.0 → 0.1.1
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/README.md +12 -3
- data/lib/fastlane/plugin/appsigner/actions/appsigner_action.rb +16 -7
- data/lib/fastlane/plugin/appsigner/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c5c6c2bc467591891f8b782535a1cfa0e249d5d6447f555e3eed7cf13440a320
         | 
| 4 | 
            +
              data.tar.gz: e67d1e28a08e1bfade33b4e043f9dff7bd8f2c8e641ddca95f559d2234ba426e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ffc69dd1010be413e44133389ff94cf349b3814fc150f61f36372b109ff6de49d8ed42302cf21d2e3c2128bbc07b3ef009a691aab103e5f47549b95f48dcb3c6
         | 
| 7 | 
            +
              data.tar.gz: 610a1facd5c19ade2ef759aaa5a96d0bb5f983749caa530ce2bde57d1e2366b92283479ca80c2b60387f7b8c128456168367f619b3aec58de3261774ff70cd09
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            #  | 
| 1 | 
            +
            # AppSigner plugin
         | 
| 2 2 |  | 
| 3 3 | 
             
            [](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  | 
| 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[: | 
| 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[: | 
| 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 | 
            -
                     | 
| 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: : | 
| 60 | 
            -
                                                     env_name: " | 
| 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  | 
| 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
         | 
    
        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. | 
| 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- | 
| 11 | 
            +
            date: 2020-05-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: pry
         |