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: bf981330fa21d9f6145709b8eadc55c65af77fd82a700cf20a611b6f9b5f6939
4
- data.tar.gz: 7b2f4aa2de267cfff72c9c573c939d1413241152e6c1e5f000b9de17284387eb
3
+ metadata.gz: 4d26d0b8789e27a8143b5f9620280c382cff7adf6bc3ef851b8fbab456cb077f
4
+ data.tar.gz: 710e042f4a2b205a5f2e6422536bc431ead33ca3ac1a3f28d64dadb61df27cd7
5
5
  SHA512:
6
- metadata.gz: 416aa4af1a86fccc7dd9b28d510260348b79b7cb38fbb8bcf1ce32c0520838afc4804b356597d5ec74550869e9f14a25f30436b465421b89cc21946808760298
7
- data.tar.gz: 88cf05159124d8fde458632f2186e03623d5de0eb015801fb09f12e3a52922b2bbcc86b470e79b4872b3f02a7d572185cb115c408d5793c7a8678e2648fb9527
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 = "http://qiniu-storage.pgyer.com/apiv1/app/upload"
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
- 'password' => password,
80
- 'updateDescription' => update_description,
81
- 'installType' => install_type,
82
- 'channelShortcut' => channel_shortcut,
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']['appShortcutUrl']}"
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']['appType'] == 1 || info['data']['appType'] == "1"
114
+ if info['data']['buildType'] == 1 || info['data']['buildType'] == "1"
113
115
  appType = "iOS"
114
116
  end
115
117
  # 应用名称
116
- appName = info['data']['appName']
118
+ appName = info['data']['buildName']
117
119
  # 应用版本信息
118
- appVersion = info['data']['appVersion']
120
+ appVersion = info['data']['buildVersion']
119
121
  # 应用蒲公英版本
120
- appBuildVersion = info['data']['appBuildVersion']
122
+ appBuildVersion = info['data']['buildBuildVersion']
121
123
  # 图标
122
- appIcon = "https://appicon.pgyer.com/image/view/app_icons/#{info['data']['appIcon']}"
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']['appShortcutUrl']}"
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" => "text",
160
- "text" => {
161
- "content" => "#{appName}#{appType} App最新#{appEnvironment}版本已发布"
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" => [],
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module PgyerJvtd
3
- VERSION = "0.2.7"
3
+ VERSION = "0.2.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-pgyer_jvtd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - 陈磊的MacBook Pro