fastlane-plugin-ipa_info 0.2.0 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e6b94e3e2d48a92b5a24aff92f6f2a492e52f78
|
4
|
+
data.tar.gz: 64732dabac7fbb769a6a1bdd5f3ad18c9d568543
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c931b63d8fbbf5c3b7f8aa94e8276670d1d6a473e99465d7fee0f3ad885fb3a5b9cf220ce11d4009fb2f8ab6cc9cd0febcf682c796b271e63bced48f888a8e9
|
7
|
+
data.tar.gz: 49e06c73b13858dde74860f1cae58cf533d50639d82f9d914f8981c0b8d9b388c246e8cc4f4e0139a656e3c875c97c6f824cd13e0c91ec521539404a99915e99
|
data/README.md
CHANGED
@@ -69,6 +69,17 @@ end
|
|
69
69
|
| Version | 1.2.0 |
|
70
70
|
| BuildVersion | 37 |
|
71
71
|
+--------------+-------+
|
72
|
+
|
73
|
+
+-------------------------+---------------------------+
|
74
|
+
| Mobile Provision |
|
75
|
+
+-------------------------+---------------------------+
|
76
|
+
| Name | Value |
|
77
|
+
+-------------------------+---------------------------+
|
78
|
+
| TeamName | Your Team Name |
|
79
|
+
| ProvisioningProfileName | Your Prifle Name |
|
80
|
+
| ExpirationDate | 2019-03-08T00:11:53+00:00 |
|
81
|
+
| DeadLine | 230 day |
|
82
|
+
+-------------------------+---------------------------+
|
72
83
|
```
|
73
84
|
|
74
85
|
## Run tests for this plugin
|
@@ -1,4 +1,5 @@
|
|
1
|
-
require
|
1
|
+
require 'ipa_analyzer'
|
2
|
+
require 'json'
|
2
3
|
|
3
4
|
module Fastlane
|
4
5
|
module Actions
|
@@ -10,40 +11,27 @@ module Fastlane
|
|
10
11
|
begin
|
11
12
|
ipa_info = IpaAnalyzer::Analyzer.new(@file)
|
12
13
|
ipa_info.open!
|
13
|
-
|
14
|
+
ipa_info_result = ipa_info.collect_info_plist_info[:content]
|
15
|
+
provision_info_result = ipa_info.collect_provision_info[:content]
|
14
16
|
ipa_info.close
|
15
17
|
rescue e
|
16
18
|
UI.user_error!(e.message)
|
17
19
|
end
|
18
20
|
|
19
21
|
# show build environment info
|
20
|
-
rows =
|
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 MacOS]].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
|
-
|
22
|
+
rows = Helper::IpaInfoHelper.build_environment_information(ipa_info_result: ipa_info_result)
|
34
23
|
summary_table = Helper::IpaInfoHelper.summary_table(title: "Build Environment", rows: rows)
|
35
24
|
puts(summary_table)
|
36
25
|
|
37
26
|
# show ipa info
|
38
|
-
rows =
|
39
|
-
[%w[CFBundleName BundleName],
|
40
|
-
%w[CFBundleShortVersionString Version],
|
41
|
-
%w[CFBundleVersion BuildVersion]].each do |key, name|
|
42
|
-
rows << [name, result[key]]
|
43
|
-
end
|
44
|
-
|
27
|
+
rows = Helper::IpaInfoHelper.ipa_information(ipa_info_result: ipa_info_result)
|
45
28
|
summary_table = Helper::IpaInfoHelper.summary_table(title: "ipa Information", rows: rows)
|
46
29
|
puts(summary_table)
|
30
|
+
|
31
|
+
# certificate info
|
32
|
+
rows = Helper::IpaInfoHelper.certificate_information(provision_info_result: provision_info_result)
|
33
|
+
summary_table = Helper::IpaInfoHelper.summary_table(title: "Mobile Provision", rows: rows)
|
34
|
+
puts(summary_table)
|
47
35
|
end
|
48
36
|
|
49
37
|
def self.description
|
@@ -3,10 +3,63 @@ require 'fastlane_core/ui/ui'
|
|
3
3
|
module Fastlane
|
4
4
|
module Helper
|
5
5
|
class IpaInfoHelper
|
6
|
+
# build environment
|
7
|
+
def self.build_environment_information(ipa_info_result:)
|
8
|
+
rows = []
|
9
|
+
[%w[DTXcode Xcode],
|
10
|
+
%w[DTXcodeBuild XcodeBuild]].each do |key, name|
|
11
|
+
rows << [name, ipa_info_result[key]]
|
12
|
+
end
|
13
|
+
|
14
|
+
# add os name and version
|
15
|
+
[%w[BuildMachineOSBuild MacOS]].each do |key, name|
|
16
|
+
mac_os_build = ipa_info_result[key]
|
17
|
+
mac_os_version = self.macos_build_to_macos_version(build: mac_os_build)
|
18
|
+
mac_os_name = self.macos_version_to_os_name(version: mac_os_version)
|
19
|
+
rows << [name, "#{mac_os_name} #{mac_os_version} (#{mac_os_build})"]
|
20
|
+
end
|
21
|
+
|
22
|
+
rows
|
23
|
+
end
|
24
|
+
|
25
|
+
# ipa info
|
26
|
+
def self.ipa_information(ipa_info_result:)
|
27
|
+
rows = []
|
28
|
+
[%w[CFBundleName BundleName],
|
29
|
+
%w[CFBundleShortVersionString Version],
|
30
|
+
%w[CFBundleVersion BuildVersion]].each do |key, name|
|
31
|
+
rows << [name, ipa_info_result[key]]
|
32
|
+
end
|
33
|
+
|
34
|
+
rows
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.certificate_information(provision_info_result:)
|
38
|
+
rows = []
|
39
|
+
[%w[TeamName TeamName],
|
40
|
+
%w[Name ProvisioningProfileName]].each do |key, name|
|
41
|
+
rows << [name, provision_info_result[key]]
|
42
|
+
end
|
43
|
+
|
44
|
+
# change expire date
|
45
|
+
[%w[ExpirationDate ExpirationDate]].each do |key, name|
|
46
|
+
today = Date.today()
|
47
|
+
expire_date = Date.parse(provision_info_result[key].to_s)
|
48
|
+
count_day = (expire_date - today).numerator
|
49
|
+
|
50
|
+
rows << [name, provision_info_result[key]]
|
51
|
+
rows << ["DeadLine", "#{count_day} day"]
|
52
|
+
end
|
53
|
+
|
54
|
+
rows
|
55
|
+
end
|
56
|
+
|
57
|
+
# macOS build number to macOS version
|
58
|
+
# @return macOS version(Sierra, High Sierra only)
|
6
59
|
def self.macos_build_to_macos_version(build:)
|
7
60
|
# reference https://support.apple.com/ja-jp/HT201260
|
8
61
|
case build
|
9
|
-
|
62
|
+
# macOS High Sierra
|
10
63
|
when "17F77" then
|
11
64
|
"10.13.5"
|
12
65
|
when "17E199", "17E201" then
|
@@ -19,7 +72,7 @@ module Fastlane
|
|
19
72
|
"10.13.1"
|
20
73
|
when "17A365", "17A405" then
|
21
74
|
"10.13"
|
22
|
-
|
75
|
+
# macOS Sierra
|
23
76
|
when "16G29", "16G1036", "16G1114", "16G1212" then
|
24
77
|
"10.12.6"
|
25
78
|
when "16F73" then
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-ipa_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tarappo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ipa_analyzer
|