fastlane-plugin-pgyer_jvtd 0.2.7 → 0.2.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d26d0b8789e27a8143b5f9620280c382cff7adf6bc3ef851b8fbab456cb077f
|
4
|
+
data.tar.gz: 710e042f4a2b205a5f2e6422536bc431ead33ca3ac1a3f28d64dadb61df27cd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e28164d4fa27eacbd5e624fb8d9eeb7ed1512b501743a836fa210b4c8d584dd6eaf93c3817400117a6d2571be35a78d602c3204e52f4340ef7bddb0417b2f78
|
7
|
+
data.tar.gz: f036fe2536b79099f9b52d1ce61904bb67236b091df8c27aa4483ffe5d280b7694a69b694091c22495b81c5b2eb4bd5128776a07646bb5dd75d77a48c94192c4
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
def self.run(params)
|
10
10
|
UI.message("The pgyer plugin is working.")
|
11
11
|
|
12
|
-
api_host = "
|
12
|
+
api_host = "https://www.pgyer.com/apiv2/app/upload"
|
13
13
|
api_key = params[:api_key]
|
14
14
|
user_key = params[:user_key]
|
15
15
|
access_token = params[:dingtalk_access_token]
|
@@ -76,10 +76,11 @@ module Fastlane
|
|
76
76
|
params = {
|
77
77
|
'_api_key' => api_key,
|
78
78
|
'uKey' => user_key,
|
79
|
-
'
|
80
|
-
'
|
81
|
-
'
|
82
|
-
'
|
79
|
+
'buildPassword' => password,
|
80
|
+
'buildUpdateDescription' => update_description,
|
81
|
+
'buildInstallType' => install_type,
|
82
|
+
'buildInstallDate' => "2",
|
83
|
+
'buildChannelShortcut' => channel_shortcut,
|
83
84
|
'file' => Faraday::UploadIO.new(build_file, 'application/octet-stream')
|
84
85
|
}
|
85
86
|
|
@@ -93,7 +94,7 @@ module Fastlane
|
|
93
94
|
return
|
94
95
|
end
|
95
96
|
|
96
|
-
UI.success "Upload success. Visit this URL to see: https://www.pgyer.com/#{info['data']['
|
97
|
+
UI.success "Upload success. Visit this URL to see: https://www.pgyer.com/#{info['data']['buildShortcutUrl']}"
|
97
98
|
else
|
98
99
|
end
|
99
100
|
|
@@ -107,24 +108,25 @@ module Fastlane
|
|
107
108
|
if environment == "pub"
|
108
109
|
appEnvironment = "正式环境"
|
109
110
|
end
|
111
|
+
appQrCode = appIcon;
|
110
112
|
if info != nil
|
111
113
|
# 应用类型
|
112
|
-
if info['data']['
|
114
|
+
if info['data']['buildType'] == 1 || info['data']['buildType'] == "1"
|
113
115
|
appType = "iOS"
|
114
116
|
end
|
115
117
|
# 应用名称
|
116
|
-
appName = info['data']['
|
118
|
+
appName = info['data']['buildName']
|
117
119
|
# 应用版本信息
|
118
|
-
appVersion = info['data']['
|
120
|
+
appVersion = info['data']['buildVersion']
|
119
121
|
# 应用蒲公英版本
|
120
|
-
appBuildVersion = info['data']['
|
122
|
+
appBuildVersion = info['data']['buildBuildVersion']
|
121
123
|
# 图标
|
122
|
-
appIcon = "https://appicon.pgyer.com/image/view/app_icons/#{info['data']['
|
124
|
+
appIcon = "https://appicon.pgyer.com/image/view/app_icons/#{info['data']['buildIcon']}"
|
123
125
|
# 地址
|
124
|
-
appUrl = "https://www.pgyer.com/#{info['data']['appShortcutUrl']}"
|
125
126
|
if channel_shortcut.nil?
|
126
|
-
appUrl = "https://www.pgyer.com/#{info['data']['
|
127
|
+
appUrl = "https://www.pgyer.com/#{info['data']['buildShortcutUrl']}"
|
127
128
|
end
|
129
|
+
appQrCode = info['data']['buildQRCodeURL'];
|
128
130
|
end
|
129
131
|
|
130
132
|
unless access_token.nil?
|
@@ -156,9 +158,12 @@ module Fastlane
|
|
156
158
|
end
|
157
159
|
|
158
160
|
params = {
|
159
|
-
"msgtype" => "
|
160
|
-
"
|
161
|
-
"
|
161
|
+
"msgtype" => "markdown",
|
162
|
+
"markdown" => {
|
163
|
+
"title" => "#{appName}#{appType} App最新#{appEnvironment}版本已发布",
|
164
|
+
"text" => "#### #{appName}#{appType} App最新#{appEnvironment}版本已发布\n" +
|
165
|
+
"> 扫描二维码即可安装" +
|
166
|
+
"> ![qrcode](#{appQrCode})\n"
|
162
167
|
},
|
163
168
|
"at" => {
|
164
169
|
"atMobiles" => [],
|