fastlane-plugin-ipa_info 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8745ab7eea3d0d350a043d68f8e8cf746c6d3ef3
4
+ data.tar.gz: 8037113b08c9c61e6a4a6db48cee5d1deb16e8ba
5
+ SHA512:
6
+ metadata.gz: 36e846f1a0eab52d9774d3837598f9a7583f4cbe3b44969cd29e829ec39ad951a3bd84e76e6f374e575b57b9aec930824977707ea5041fa4ce466f140f76fc10
7
+ data.tar.gz: 753092c5b51a5f04c7dca6796f5200cfbf52a59bc14466e4e6fa559d960e51e269e58d4e5527eecaa64c515debc20600390ebb02c8495d203768f80899ca6ca6
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 tarappo <tarappo@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,82 @@
1
+ # ipa_info plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-ipa_info) [![CircleCI](https://circleci.com/gh/tarappo/fastlane-plugin-ipa_info.svg?style=svg)](https://circleci.com/gh/tarappo/fastlane-plugin-ipa_info)
4
+
5
+ ## Getting Started
6
+
7
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-ipa_info`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin ipa_info
11
+ ```
12
+
13
+ ## About ipa_info
14
+
15
+ show information of the info.plist file in the ipa file.
16
+
17
+ ## Action
18
+
19
+ ```
20
+ ipa_info(
21
+ ipa_file: ${your_ipa_file_path}
22
+ )
23
+ ```
24
+
25
+ ```
26
+ +----------+------------------+----------+---------+
27
+ | ipa_info Options |
28
+ +----------+------------------+----------+---------+
29
+ | Key | Description | Env Var | Default |
30
+ +----------+------------------+----------+---------+
31
+ | ipa_file | Path to your | IPA_FILE | |
32
+ | | ipa file. | | |
33
+ | | Optional if you | | |
34
+ | | use the `gym`, | | |
35
+ | | `ipa` or | | |
36
+ | | `xcodebuild` | | |
37
+ | | action. | | |
38
+ +----------+------------------+----------+---------+
39
+ ```
40
+
41
+ ### Example Result
42
+
43
+ ```
44
+ +------------+--------+
45
+ | Info.Plist |
46
+ +------------+--------+
47
+ | Name | Value |
48
+ +------------+--------+
49
+ | Xcode | 0941 |
50
+ | Build | 9F2000 |
51
+ | MacOSBuild | 17F77 |
52
+ +------------+--------+
53
+ ```
54
+
55
+ ## Run tests for this plugin
56
+
57
+ To run both the tests, and code style validation, run
58
+
59
+ ```
60
+ rake
61
+ ```
62
+
63
+ To automatically fix many of the styling issues, use
64
+ ```
65
+ rubocop -a
66
+ ```
67
+
68
+ ## Issues and Feedback
69
+
70
+ For any other issues and feedback about this plugin, please submit it to this repository.
71
+
72
+ ## Troubleshooting
73
+
74
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
75
+
76
+ ## Using _fastlane_ Plugins
77
+
78
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
79
+
80
+ ## About _fastlane_
81
+
82
+ _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/ipa_info/version'
2
+
3
+ module Fastlane
4
+ module IpaInfo
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::IpaInfo.all_classes.each do |current|
15
+ require current
16
+ end
@@ -0,0 +1,76 @@
1
+ require "ipa_analyzer"
2
+
3
+ module Fastlane
4
+ module Actions
5
+ class IpaInfoAction < Action
6
+ def self.run(params)
7
+ @file = params[:ipa_file]
8
+ UI.user_error!('You have to set path an ipa file') unless @file
9
+
10
+ begin
11
+ ipa_info = IpaAnalyzer::Analyzer.new(@file)
12
+ ipa_info.open!
13
+ result = ipa_info.collect_info_plist_info[:content]
14
+ ipa_info.close
15
+ rescue e
16
+ UI.user_error!(e.message)
17
+ end
18
+
19
+ rows = []
20
+ # show original info
21
+ [%w[DTXcode Xcode],
22
+ %w[DTXcodeBuild XcodeBuild]].each do |key, name|
23
+ rows << [name, result[key]]
24
+ end
25
+
26
+ # add os name and version
27
+ [%w[BuildMachineOSBuild MacOSBuild]].each do |key, name|
28
+ mac_os_build = result[key]
29
+ mac_os_version = Helper::IpaInfoHelper.macos_build_to_macos_version(build: mac_os_build)
30
+ mac_os_name = Helper::IpaInfoHelper.macos_version_to_os_name(version: mac_os_version)
31
+ rows << [name, "#{mac_os_name} #{mac_os_version} (#{mac_os_build})"]
32
+ end
33
+
34
+
35
+ summary_table = Terminal::Table.new(
36
+ title: "Info.Plist",
37
+ headings: ["Name", "Value"],
38
+ rows: FastlaneCore::PrintTable.transform_output(rows)
39
+ ).to_s
40
+ puts(summary_table)
41
+ end
42
+
43
+ def self.description
44
+ "Show information of an ipa file."
45
+ end
46
+
47
+ def self.authors
48
+ ["tarappo"]
49
+ end
50
+
51
+ def self.return_value
52
+ end
53
+
54
+ def self.details
55
+ "Show information of an ipa file."
56
+ end
57
+
58
+ def self.available_options
59
+ [
60
+ FastlaneCore::ConfigItem.new(key: :ipa_file,
61
+ env_name: 'IPA_FILE',
62
+ description: 'Path to your ipa file. Optional if you use the `gym`, `ipa` or `xcodebuild` action. ',
63
+ default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Dir['*.ipa'].last,
64
+ optional: true,
65
+ verify_block: proc do |value|
66
+ raise "Couldn't find ipa file".red unless File.exist?(value)
67
+ end)
68
+ ]
69
+ end
70
+
71
+ def self.is_supported?(platform)
72
+ [:ios].include?(platform)
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,53 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ module Helper
5
+ class IpaInfoHelper
6
+ def self.macos_build_to_macos_version(build:)
7
+ # reference https://support.apple.com/ja-jp/HT201260
8
+ case build
9
+ # macOS High Sierra
10
+ when "17F77" then
11
+ "10.13.5"
12
+ when "17E199", "17E201" then
13
+ "10.13.4"
14
+ when "17D47", "17D102", "17D2047", "17D2102" then
15
+ "10.13.3"
16
+ when "17C88", "17C89", "17C205", "17C2205" then
17
+ "10.13.2"
18
+ when "17B48", "17B1002", "17B1003" then
19
+ "10.13.1"
20
+ when "17A365", "17A405" then
21
+ "10.13"
22
+ # macOS Sierra
23
+ when "16G29", "16G1036", "16G1114", "16G1212" then
24
+ "10.12.6"
25
+ when "16F73" then
26
+ "10.12.5"
27
+ when "16E195" then
28
+ "10.12.4"
29
+ when "16D32" then
30
+ "10.12.3"
31
+ when "16C67" then
32
+ "10.12.2"
33
+ when "16B2555", "16B2557" then
34
+ "10.12.1"
35
+ when "16A323" then
36
+ "10.12.1"
37
+ end
38
+ end
39
+
40
+ def self.macos_version_to_os_name(version:)
41
+ minor_version = version.split(".")[1].to_i
42
+ # reference https://support.apple.com/ja-jp/HT201260
43
+ case minor_version
44
+ when 13
45
+ "macOS High Sierra"
46
+ when 12
47
+ "macOS Sierra"
48
+ end
49
+ end
50
+
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module IpaInfo
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,189 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-ipa_info
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - tarappo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-07-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ipa_analyzer
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
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: pry
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: bundler
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
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: rspec_junit_formatter
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: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 0.49.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.49.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-require_tools
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: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: fastlane
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 2.95.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 2.95.0
153
+ description:
154
+ email: tarappo@gmail.com
155
+ executables: []
156
+ extensions: []
157
+ extra_rdoc_files: []
158
+ files:
159
+ - LICENSE
160
+ - README.md
161
+ - lib/fastlane/plugin/ipa_info.rb
162
+ - lib/fastlane/plugin/ipa_info/actions/ipa_info_action.rb
163
+ - lib/fastlane/plugin/ipa_info/helper/ipa_info_helper.rb
164
+ - lib/fastlane/plugin/ipa_info/version.rb
165
+ homepage: https://github.com/tarappo/fastlane-plugin-ipa_info
166
+ licenses:
167
+ - MIT
168
+ metadata: {}
169
+ post_install_message:
170
+ rdoc_options: []
171
+ require_paths:
172
+ - lib
173
+ required_ruby_version: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ required_rubygems_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ requirements: []
184
+ rubyforge_project:
185
+ rubygems_version: 2.5.2
186
+ signing_key:
187
+ specification_version: 4
188
+ summary: show ipa info
189
+ test_files: []