fastlane-plugin-zealot 0.2.0.beta1 → 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
  SHA256:
3
- metadata.gz: 264233b0c85829d6ca9f3ca44b10ac52034e746b06551d6ae3aeca63c831d906
4
- data.tar.gz: 930c4c1af6719fad749f079a931ecf8b84b4764811802a5c08eba8634a4a40d6
3
+ metadata.gz: 34621d7f1d471105ef4f2ce9466f5224833b36b1eecd75153d3964e3a1b7d18b
4
+ data.tar.gz: b04284be27139362c64f4dd17f4a2ecea13a90c85c6190375c7f1d2e75052ee4
5
5
  SHA512:
6
- metadata.gz: '041509054ac5119b97e271fd1910163d567eeb49b029a5b93bf8bc6ec777e32503b34fee1cb872498db282c3e0294fe200a01a164267b52c6227560529166cee'
7
- data.tar.gz: c8f1c527d2e7272567f1fbcc10ddd21e7e0e5d9dcfaf85f79a30372ad96279eea947708c42437b317d06adfb98178b28417db0410ca305140888af8ea698f81f
6
+ metadata.gz: b55bb732cc1f27afee3b1502140f42fa55f0e8e2654eab7352e7db1520557b40680a89f23002f9576582bb642b096081289914ced6ebb464d773b8d85a23cd84
7
+ data.tar.gz: ed766de38a64b69fc0c970fe1e072489f6e1aa72ee834a51c237f175c79689af41727d6b9f6759d76a207a9f4de0c692a0800c167de63f251a2f27eb5776cc3e
@@ -103,14 +103,20 @@ module Fastlane
103
103
  FastlaneCore::ConfigItem.new(key: :branch,
104
104
  env_name: 'ZEALOT_BRANCH',
105
105
  description: 'The name of git branch',
106
+ default_value: ENV['GIT_BRANCH'] || ENV['CI_COMMIT_REF_NAME'] || ENV['CI_BUILD_REF_NAME'],
106
107
  optional: true,
107
108
  type: String),
108
109
  FastlaneCore::ConfigItem.new(key: :git_commit,
109
110
  env_name: 'ZEALOT_GIT_COMMIT',
110
111
  description: 'The hash of git commit',
111
112
  optional: true,
112
- default_value: ENV['GIT_COMMIT'] || ENV['CI_COMMIT_SHA'],
113
+ default_value: ENV['GIT_COMMIT'] || ENV['CI_COMMIT_SHA'] || ENV['CI_BUILD_REF'],
113
114
  type: String),
115
+ FastlaneCore::ConfigItem.new(key: :custom_fields,
116
+ env_name: 'ZEALOT_CUSTOM_FIELDS',
117
+ description: 'The key-value hash of custom fields',
118
+ optional: true,
119
+ type: Array),
114
120
  FastlaneCore::ConfigItem.new(key: :password,
115
121
  env_name: 'ZEALOT_PASSWORD',
116
122
  description: 'The password of app to download',
@@ -18,9 +18,6 @@ module Fastlane
18
18
  response = upload_debug_file(params, file)
19
19
  if parse_response(response, params[:endpoint], params[:fail_on_error])
20
20
  UI.success('Build successfully uploaded to Zealot.')
21
- # UI.success("Release URL: #{Actions.lane_context[SharedValues::ZEALOT_RELEASE_URL]}")
22
- # UI.success("QRCode URL: #{Actions.lane_context[SharedValues::ZEALOT_QRCODE_URL]}")
23
- # UI.success("Download URL: #{Actions.lane_context[SharedValues::ZEALOT_INSTALL_URL]}")
24
21
  end
25
22
  end
26
23
 
@@ -69,10 +66,6 @@ module Fastlane
69
66
  return show_error("Error uploading to Zealot: #{response.body}", fail_on_error)
70
67
  end
71
68
 
72
- # Actions.lane_context[SharedValues::ZEALOT_RELEASE_URL] = body['release_url']
73
- # Actions.lane_context[SharedValues::ZEALOT_INSTALL_URL] = body['install_url']
74
- # Actions.lane_context[SharedValues::ZEALOT_QRCODE_URL] = body['qrcode_url']
75
-
76
69
  true
77
70
  end
78
71
  private_class_method :parse_response
@@ -42,7 +42,7 @@ module Fastlane
42
42
  # recommand generate collect changelog plugin: https://github.com/icyleaf/fastlane-plugin-ci_changelog
43
43
  form[:changelog] = changelog_raw if changelog_raw = ENV['CICL_CHANGLOG']
44
44
 
45
- print_table(form, title: 'zealot', hidden_keys: [:token])
45
+ print_table(form, title: 'zealot', hidden_keys: hidden_keys(params))
46
46
 
47
47
  endpoint = params[:endpoint]
48
48
  UI.success("Uploading to #{endpoint} ...")
@@ -67,13 +67,14 @@ module Fastlane
67
67
  end
68
68
 
69
69
  UPLOAD_APP_PARAMS_KEYS = %w[
70
- name changelog release_type
71
- slug source branch git_commit password
70
+ name changelog release_type slug branch
71
+ source git_commit password custom_fields
72
72
  ].freeze
73
73
 
74
74
  def avialable_upload_app_params(params)
75
75
  UPLOAD_APP_PARAMS_KEYS.each_with_object({}) do |key, obj|
76
76
  value = params.fetch(key.to_sym, ask: false)
77
+ value = JSON.dump(value) if key == 'custom_fields' && value
77
78
  obj[key.to_sym] = value if value && !value.empty?
78
79
  end
79
80
  end
@@ -82,7 +83,7 @@ module Fastlane
82
83
 
83
84
  def check_app_version(params)
84
85
  query = build_app_version_check_params(params)
85
- print_table(query, title: 'zealot_version_check', hidden_keys: ['token'])
86
+ print_table(query, title: 'zealot_version_check', hidden_keys: hidden_keys(params))
86
87
 
87
88
  UI.success("Checking app version from Zealot ...")
88
89
  connection = make_connection(params[:endpoint], params[:verify_ssl])
@@ -145,7 +146,7 @@ module Fastlane
145
146
  rows = form.dup
146
147
  rows.keys.each do |k|
147
148
  rows.delete(k) if remove_empty_value && !rows[k]
148
- rows.delete(k) if hidden_keys.include?(k.to_s)
149
+ rows.delete(k) if hidden_keys.include?(k.to_sym)
149
150
  rows[k] = rows[k].path if rows[k].is_a?(UploadIO)
150
151
  end
151
152
  puts Terminal::Table.new(
@@ -163,6 +164,12 @@ module Fastlane
163
164
 
164
165
  false
165
166
  end
167
+
168
+ def hidden_keys(params)
169
+ return [] unless params[:hide_user_token]
170
+
171
+ [:token]
172
+ end
166
173
  end
167
174
  end
168
175
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Zealot
3
- VERSION = "0.2.0.beta1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-zealot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta1
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: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane-plugin-debug_file
@@ -179,9 +179,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
- - - ">"
182
+ - - ">="
183
183
  - !ruby/object:Gem::Version
184
- version: 1.3.1
184
+ version: '0'
185
185
  requirements: []
186
186
  rubygems_version: 3.0.3
187
187
  signing_key: