fastlane-plugin-app_info 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: c491623d54fa2a594504a83a93e79d8d897b01d1
4
- data.tar.gz: 4e7de4e2c1b7d54276c719bc31b9a954242f88ef
3
+ metadata.gz: b788b8b56afc93ec405d1d2d538010f4579f272e
4
+ data.tar.gz: 9921dc1352fa525c368448a361e15700efebf75b
5
5
  SHA512:
6
- metadata.gz: 431d3babf08aeb5059754bba49a8126d30a02a691f777c94742d23d94efc0b2d21feae98c6153b5b0ae15181c0ce74f6ae23d3bd62c24443e78e1eb8428c9456
7
- data.tar.gz: aef6593197881e2d2184c3ad315fc9035b806eeb3779e18baeacbb0ae8c1956979017200b965b7097ac298b8acb5581c1456958f9b83303403ed552f30100adc
6
+ metadata.gz: cd453c003f402e9af916e800a5ceba14f755697f4fe15b6202d2736bf17cddb1bbfd049857b3630a61c0659c757d21dd6c1cf1dcd226188c0992f9c399ef01bd
7
+ data.tar.gz: d247080aa87eb7635b055a849acdda62170d1184f0052220807a2958f979873d6f6b1dc57bc0d554d236600b9a33d1a527700504189ac994f111ced252bfa00d
data/README.md CHANGED
@@ -14,6 +14,37 @@ fastlane add_plugin app_info
14
14
 
15
15
  Teardown tool for mobile app(ipa/apk), analysis metedata like version, name, icon etc.
16
16
 
17
+ ## Configure
18
+
19
+ ```+----------------------------------------------------------------------------------------+
20
+ | app_info |
21
+ +----------------------------------------------------------------------------------------+
22
+ | Parse and dump mobile app(ipa/apk) metedata. |
23
+ | |
24
+ | Teardown tool for mobile app(ipa/apk), analysis metedata like version, name, icon etc. |
25
+ | |
26
+ | Created by icyleaf <icyleaf.cn@gmail.com> |
27
+ +----------------------------------------------------------------------------------------+
28
+
29
+ +------+-------------------------------------------------+---------------+---------+
30
+ | app_info Options |
31
+ +------+-------------------------------------------------+---------------+---------+
32
+ | Key | Description | Env Var | Default |
33
+ +------+-------------------------------------------------+---------------+---------+
34
+ | file | Path to your ipa/apk file. Optional if you use | APP_INFO_FILE | |
35
+ | | the `gym`, `ipa` or `xcodebuild` action. | | |
36
+ +------+-------------------------------------------------+---------------+---------+
37
+
38
+ +----------+---------------------------------+
39
+ | app_info Output Variables |
40
+ +----------+---------------------------------+
41
+ | Key | Description |
42
+ +----------+---------------------------------+
43
+ | APP_INFO | the json formated app info data |
44
+ +----------+---------------------------------+
45
+ Access the output values using `lane_context[SharedValues::VARIABLE_NAME]`
46
+ ```
47
+
17
48
  ## Example
18
49
 
19
50
  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`.
@@ -23,6 +54,7 @@ Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plu
23
54
  ### iOS
24
55
 
25
56
  ```bash
57
+ $ bundle exec fastlane action app_info
26
58
  +-----------------------------+-------------------------------------------------+
27
59
  | Summary for app_info 0.1.0 |
28
60
  +-----------------------------+-------------------------------------------------+
@@ -1,8 +1,12 @@
1
- require 'app_info'
1
+ require 'app-info'
2
2
  require 'terminal-table'
3
3
 
4
4
  module Fastlane
5
5
  module Actions
6
+ module SharedValues
7
+ APP_INFO = :APP_INFO
8
+ end
9
+
6
10
  class AppInfoAction < Action
7
11
  def self.run(params)
8
12
  @file = params.fetch(:file)
@@ -11,6 +15,9 @@ module Fastlane
11
15
  @app = ::AppInfo.parse(@file)
12
16
 
13
17
  print_table!
18
+
19
+ # Store shared value
20
+ Helper::AppInfoHelper.store_sharedvalue(:APP_INFO, Helper::AppInfoHelper.app_to_json(@app))
14
21
  end
15
22
 
16
23
  def self.print_table!
@@ -28,7 +35,7 @@ module Fastlane
28
35
  end
29
36
 
30
37
  def self.common_columns
31
- %w(name release_version build_version identifier os).each_with_object({}) do |key, hash|
38
+ Helper::AppInfoHelper.common_columns.each_with_object({}) do |key, hash|
32
39
  name = key.split('_').map(&:capitalize).join('')
33
40
  hash[name] = Helper::AppInfoHelper.object_to_column(@app.send(key.to_sym))
34
41
  end
@@ -46,17 +53,23 @@ module Fastlane
46
53
  end
47
54
 
48
55
  def self.description
49
- "Teardown tool for mobile app(ipa/apk), analysis metedata like version, name, icon etc."
56
+ "Parse and dump mobile app(ipa/apk) metedata."
50
57
  end
51
58
 
52
59
  def self.authors
53
- ["icyleaf"]
60
+ ["icyleaf <icyleaf.cn@gmail.com>"]
54
61
  end
55
62
 
56
63
  def self.details
57
64
  "Teardown tool for mobile app(ipa/apk), analysis metedata like version, name, icon etc."
58
65
  end
59
66
 
67
+ def self.output
68
+ [
69
+ [SharedValues::APP_INFO.to_s, 'the json formated app info data']
70
+ ]
71
+ end
72
+
60
73
  def self.available_options
61
74
  [
62
75
  FastlaneCore::ConfigItem.new(key: :file,
@@ -71,7 +84,7 @@ module Fastlane
71
84
  end
72
85
 
73
86
  def self.is_supported?(platform)
74
- [:ios, :android].include?(platform)
87
+ %i[ios android].include?(platform)
75
88
  end
76
89
  end
77
90
  end
@@ -1,3 +1,5 @@
1
+ require 'json'
2
+
1
3
  module Fastlane
2
4
  module Helper
3
5
  class AppInfoHelper
@@ -22,6 +24,33 @@ module Fastlane
22
24
  key
23
25
  end
24
26
  end
27
+
28
+ def self.common_columns
29
+ %w[name release_version build_version identifier os]
30
+ end
31
+
32
+ def self.app_to_json(app)
33
+ data = common_columns.each_with_object({}) do |key, obj|
34
+ name = key.split('_').map(&:capitalize).join('')
35
+ obj[name] = app.send(key.to_sym)
36
+ end
37
+
38
+ if app.os == 'iOS' && app.mobileprovision && !app.mobileprovision.empty?
39
+ app.mobileprovision.mobileprovision.each do |key, value|
40
+ next if key == 'DeveloperCertificates'
41
+ data[key] = value
42
+ end
43
+ end
44
+
45
+ JSON.dump(data)
46
+ end
47
+
48
+ def self.store_sharedvalue(key, value)
49
+ Actions.lane_context[key] = value
50
+ ENV[key.to_s] = value
51
+
52
+ value
53
+ end
25
54
  end
26
55
  end
27
56
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AppInfo
3
- VERSION = "0.1.0"
3
+ VERSION = '0.2.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-app_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-08 00:00:00.000000000 Z
11
+ date: 2018-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: app-info
@@ -16,16 +16,16 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.3
19
+ version: 1.0.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.3
26
+ version: 1.0.4
27
27
  - !ruby/object:Gem::Dependency
28
- name: pry
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,21 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
42
+ name: fastlane
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 1.111.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 1.111.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rubocop
84
+ name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,19 +95,19 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: fastlane
98
+ name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.111.0
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 1.111.0
110
+ version: '0'
111
111
  description:
112
112
  email: icyleaf.cn@gmail.com
113
113
  executables: []
@@ -120,7 +120,7 @@ files:
120
120
  - lib/fastlane/plugin/app_info/actions/app_info_action.rb
121
121
  - lib/fastlane/plugin/app_info/helper/app_info_helper.rb
122
122
  - lib/fastlane/plugin/app_info/version.rb
123
- homepage:
123
+ homepage: https://github.com/icyleaf/fastlane-plugin-app_info
124
124
  licenses:
125
125
  - MIT
126
126
  metadata: {}
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.8
143
+ rubygems_version: 2.6.12
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Teardown tool for mobile app(ipa/apk), analysis metedata like version, name,