fastlane-plugin-ipa_install_plist_generate 0.1.0 → 1.0.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
  SHA256:
3
- metadata.gz: aca590718aac83b927f1e602fe689794f8fc361555fdca2939b23b5d73dae4a5
4
- data.tar.gz: 5be8ddb9b7fec73e28022a247d4e451f2e00a633320c004cd6cb26a233b24adf
3
+ metadata.gz: 6f779a8454a921bab962b54e85380ab106332ad273d4a7dfbc160ff8330b3618
4
+ data.tar.gz: d734bce595ff608b42aa07168dc767d5bb8be58561285c7b1cfdcf95b437e90b
5
5
  SHA512:
6
- metadata.gz: f321a3dd863adee15db98999d4e283efbc749470614b941aec6cfccb60d112df703f0d3d774ebecad4a67d7f2f7ef376c025635b3dc984d34ec2e97e52a2b399
7
- data.tar.gz: d109e1ea04e2bbd5d7ee969cc49245766108b9a23a0c23f56a484d042febb449bdb0c80354cee1eca28c857fb676e47c5ce374ee4e38b9c60166947bd638b99d
6
+ metadata.gz: bf1dff59bfdc83550f4d904b4e8fddb367f213817a3ac6d7b51fc87f26f9e8d101dd2c0619fab781015d59432821f419c97777292d27f87f76caffb58925a00c
7
+ data.tar.gz: aae3597bcfe0fc7cfcf2c041afbf9c4c4dbc673a0e5b10eb38511d08b4c6fa6cfa61703efdd28aa6a34bc1906ac247a332a121323ca30e58dd63a9cb65228f8a
data/README.md CHANGED
@@ -32,50 +32,50 @@ lane :test do
32
32
  end
33
33
  ```
34
34
 
35
- generate plist for below:
35
+ generate plist for below:
36
36
 
37
37
  ```plist
38
38
  <?xml version="1.0" encoding="UTF-8"?>
39
39
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
40
40
  <plist version="1.0">
41
41
  <dict>
42
- <key>items</key>
43
- <array>
44
- <dict>
45
- <key>assets</key>
46
- <array>
47
- <dict>
48
- <key>kind</key>
49
- <string>software-package</string>
50
- <key>url</key>
51
- <string>https://updown.in.xx.com/download/xx-6.5.0-189-20190726_101548.ipa</string>
52
- </dict>
53
- <dict>
54
- <key>kind</key>
55
- <string>display-image</string>
56
- <key>url</key>
57
- <string>https://example.com/app.png</string>
58
- </dict>
59
- <dict>
60
- <key>kind</key>
61
- <string>full-size-image</string>
62
- <key>url</key>
63
- <string>https://example.com/app.png</string>
64
- </dict>
65
- </array>
66
- <key>metadata</key>
67
- <dict>
68
- <key>bundle-identifier</key>
69
- <string>com.cn.xzh</string>
70
- <key>bundle-version</key>
71
- <string>9.9.9</string>
72
- <key>kind</key>
73
- <string>software</string>
74
- <key>title</key>
75
- <string>test app</string>
76
- </dict>
77
- </dict>
78
- </array>
42
+ <key>items</key>
43
+ <array>
44
+ <dict>
45
+ <key>assets</key>
46
+ <array>
47
+ <dict>
48
+ <key>kind</key>
49
+ <string>software-package</string>
50
+ <key>url</key>
51
+ <string>https://updown.in.xx.com/download/xx-6.5.0-189-20190726_101548.ipa</string>
52
+ </dict>
53
+ <dict>
54
+ <key>kind</key>
55
+ <string>display-image</string>
56
+ <key>url</key>
57
+ <string>https://example.com/app.png</string>
58
+ </dict>
59
+ <dict>
60
+ <key>kind</key>
61
+ <string>full-size-image</string>
62
+ <key>url</key>
63
+ <string>https://example.com/app.png</string>
64
+ </dict>
65
+ </array>
66
+ <key>metadata</key>
67
+ <dict>
68
+ <key>bundle-identifier</key>
69
+ <string>com.cn.xzh</string>
70
+ <key>bundle-version</key>
71
+ <string>9.9.9</string>
72
+ <key>kind</key>
73
+ <string>software</string>
74
+ <key>title</key>
75
+ <string>test app</string>
76
+ </dict>
77
+ </dict>
78
+ </array>
79
79
  </dict>
80
80
  </plist>
81
81
  ```
@@ -3,37 +3,35 @@ require_relative '../helper/ipa_install_plist_generate_helper'
3
3
 
4
4
  module Fastlane
5
5
  module Actions
6
- module SharedValues
7
- IPA_INSTALL_PLISTG_ENERATE_PLIST_HASH = :IPA_INSTALL_PLISTG_ENERATE_PLIST_HASH
8
- IPA_INSTALL_PLISTG_ENERATE_PLIST_STRING = :IPA_INSTALL_PLISTG_ENERATE_PLIST_STRING
9
- end
10
6
  class IpaInstallPlistGenerateAction < Action
11
7
  def self.run(params)
12
8
  require 'plist'
13
9
 
14
- output = params[:output]
15
- url = params[:url]
10
+ output = params[:output]
11
+ url = params[:url]
16
12
  bundle_identifier = params[:bundle_identifier]
17
- bundle_version = params[:bundle_version]
18
- display_image = params[:display_image]
19
- full_size_image = params[:full_size_image]
20
- title = params[:title]
13
+ bundle_version = params[:bundle_version]
14
+ title = params[:title]
15
+ display_image = params[:display_image]
16
+ full_size_image = params[:full_size_image]
21
17
 
22
18
  assets = [
23
19
  {
24
20
  'kind' => 'software-package',
25
21
  'url' => url
26
- },
27
- {
28
- 'kind' => 'display-image',
29
- 'url' => display_image
30
- },
31
- {
32
- 'kind' => 'full-size-image',
33
- 'url' => full_size_image
34
22
  }
35
23
  ]
36
24
 
25
+ assets << {
26
+ 'kind' => 'display-image',
27
+ 'url' => display_image
28
+ } if display_image
29
+
30
+ assets << {
31
+ 'kind' => 'full-size-image',
32
+ 'url' => full_size_image
33
+ } if full_size_image
34
+
37
35
  metadata = {
38
36
  'bundle-identifier' => bundle_identifier,
39
37
  'bundle-version' => bundle_version,
@@ -47,10 +45,7 @@ module Fastlane
47
45
  'metadata' => metadata
48
46
  }]
49
47
  }
50
- Actions.lane_context[SharedValues::IPA_INSTALL_PLISTG_ENERATE_PLIST_HASH] = plist_hash
51
-
52
48
  plist_string = Plist::Emit.dump(plist_hash)
53
- Actions.lane_context[SharedValues::IPA_INSTALL_PLISTG_ENERATE_PLIST_STRING] = plist_string
54
49
 
55
50
  File.open(output, 'w') do |f|
56
51
  f.write(plist_string)
@@ -66,7 +61,7 @@ module Fastlane
66
61
  end
67
62
 
68
63
  def self.return_value
69
-
64
+
70
65
  end
71
66
 
72
67
  def self.details
@@ -78,37 +73,54 @@ module Fastlane
78
73
  FastlaneCore::ConfigItem.new(
79
74
  key: :output,
80
75
  description: "where save generate ipa plist file",
81
- type: String
76
+ type: String,
77
+ verify_block: proc do |value|
78
+ UI.user_error!("❌ nil or empty") unless (value and not value.empty?)
79
+ end
82
80
  ),
83
81
  FastlaneCore::ConfigItem.new(
84
82
  key: :url,
85
83
  description: "ipa download url",
86
- type: String
84
+ type: String,
85
+ verify_block: proc do |value|
86
+ UI.user_error!("❌ nil or empty") unless (value and not value.empty?)
87
+ end
87
88
  ),
88
89
  FastlaneCore::ConfigItem.new(
89
90
  key: :bundle_identifier,
90
91
  description: "ios app's bundle identifier",
91
- type: String
92
+ type: String,
93
+ verify_block: proc do |value|
94
+ UI.user_error!("❌ nil or empty") unless (value and not value.empty?)
95
+ end
92
96
  ),
93
97
  FastlaneCore::ConfigItem.new(
94
98
  key: :bundle_version,
95
99
  description: "ios app's bundle version",
96
- type: String
100
+ type: String,
101
+ verify_block: proc do |value|
102
+ UI.user_error!("❌ nil or empty") unless (value and not value.empty?)
103
+ end
104
+ ),
105
+ FastlaneCore::ConfigItem.new(
106
+ key: :title,
107
+ description: "ipa file title",
108
+ type: String,
109
+ verify_block: proc do |value|
110
+ UI.user_error!("❌ nil or empty") unless (value and not value.empty?)
111
+ end
97
112
  ),
98
113
  FastlaneCore::ConfigItem.new(
99
114
  key: :display_image,
100
115
  description: "eg: https://example.com/app.png",
101
- type: String
116
+ type: String,
117
+ optional: true
102
118
  ),
103
119
  FastlaneCore::ConfigItem.new(
104
120
  key: :full_size_image,
105
121
  description: "eg: https://example.com/app.png",
106
- type: String
107
- ),
108
- FastlaneCore::ConfigItem.new(
109
- key: :title,
110
- description: "ipa file title",
111
- type: String
122
+ type: String,
123
+ optional: true
112
124
  )
113
125
  ]
114
126
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module IpaInstallPlistGenerate
3
- VERSION = "0.1.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-ipa_install_plist_generate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiongzenghui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-30 00:00:00.000000000 Z
11
+ date: 2019-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.0.4
170
+ rubygems_version: 3.0.6
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: iOS ipa enterprise install plist generate plugn