lhj-tools 0.2.61 → 0.2.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lhj/helper/pgyer_helper.rb +13 -15
- data/lib/lhj/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b06a7cc355541d7c1a049c137aac1805143560ac8ba051dc4d435303fbbc30d9
|
|
4
|
+
data.tar.gz: b84e8b7d58daed0b4fafceb4fabbef26a7c8b8ef9f7a06866e2e381818f7143b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: abc525c352b610813d16ac55437eec92c1e826d0ad5da5e10ae2b59150f25bf864449753a242c46a5364ecd20a44e5124f76f0c47ea789e5df04e8b09329c604
|
|
7
|
+
data.tar.gz: c6eb6eed5ab5c1a6922e9cdcd0332d44544091af608420ba6fe5f279f8d52ebf45e07ffaffd880e4322f6861f035a5340e7ec4ce115112ec4b0f193ade97f39d
|
|
@@ -71,7 +71,7 @@ module Lhj
|
|
|
71
71
|
response = pgyer_client.post "#{API_HOST}/getCOSToken", request_params
|
|
72
72
|
info = response.body
|
|
73
73
|
|
|
74
|
-
if info[
|
|
74
|
+
if info['code'] != 0
|
|
75
75
|
UI.user_error!("Get token is failed, info: #{info}")
|
|
76
76
|
end
|
|
77
77
|
|
|
@@ -89,33 +89,31 @@ module Lhj
|
|
|
89
89
|
UI.user_error!("PGYER Plugin Upload Error: #{response.body}")
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
@result =
|
|
92
|
+
@result = check_publish_status(pgyer_client, API_HOST, @api_key, key)
|
|
93
93
|
|
|
94
94
|
puts @result
|
|
95
95
|
Actions.sh('git restore ./', log: false) if File.exist?(File.expand_path('./.git'))
|
|
96
96
|
puts 'upload success'
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
-
def
|
|
99
|
+
def check_publish_status(client, api_host, api_key, build_key)
|
|
100
100
|
url = "#{api_host}/buildInfo"
|
|
101
|
-
|
|
102
|
-
response = client.post "#{api_host}/buildInfo", { :_api_key => api_key, :buildKey => buildKey }
|
|
101
|
+
response = client.post url, { :_api_key => api_key, :buildKey => build_key }
|
|
103
102
|
info = response.body
|
|
104
103
|
code = info['code']
|
|
105
|
-
if code
|
|
104
|
+
if code.zero?
|
|
106
105
|
UI.success "Upload success. BuildInfo is #{info['data']}."
|
|
107
|
-
|
|
108
|
-
if
|
|
109
|
-
|
|
106
|
+
short_url = info['data']['buildShortcutUrl']
|
|
107
|
+
if short_url.nil? || short_url == ''
|
|
108
|
+
short_url = info['data']['buildKey']
|
|
110
109
|
end
|
|
111
|
-
info[
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
elsif code == 1246 || code == 1247
|
|
110
|
+
info['data']['fastlaneAddedWholeVisitUrl'] = "https://wwww.xcxwo.com/#{short_url}"
|
|
111
|
+
return info
|
|
112
|
+
elsif [1246, 1247].include?(code)
|
|
115
113
|
sleep 3
|
|
116
|
-
|
|
114
|
+
check_publish_status(client, api_host, api_key, build_key)
|
|
117
115
|
else
|
|
118
|
-
UI.user_error!("PGYER Plugin Published Error: #{info} buildKey: #{
|
|
116
|
+
UI.user_error!("PGYER Plugin Published Error: #{info} buildKey: #{build_key}")
|
|
119
117
|
end
|
|
120
118
|
end
|
|
121
119
|
|
data/lib/lhj/version.rb
CHANGED