fastlane-plugin-notifyworker 0.1.2 → 0.1.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9610a3ec33621ad901939cf68101a4ea147384db22340559aaf0b6543b337ed
|
4
|
+
data.tar.gz: 5a7ab504dff36157a86332840aa0463a64a210fca98bf40748364d1942ba062f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17a66ad3a6aaba5eca44b93042e77c148a30cd83c0e8e2bf2cf3cc88009d794fd9827966bae8ee9813cabdef9b954e1b3fd67b865fb6db79c276aa02134a0617
|
7
|
+
data.tar.gz: a0c555c3b0390d14a1cb495661ef37809c8128c8edb1c30cf178037b7ab51ed4e453bcf41a102813ee9d131fad303d187b9fbe3c0ff8f56f36542da5f30f163c
|
data/README.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: zluof
|
3
|
+
* @Date: 2021-09-06 16:40:13
|
4
|
+
* @LastEditTime: 2021-09-13 14:19:34
|
5
|
+
* @LastEditors: zluof
|
6
|
+
* @Description:
|
7
|
+
* @FilePath: /fastlane-plugin-notifyworker/README.md
|
8
|
+
-->
|
1
9
|
# notifyworker plugin
|
2
10
|
|
3
11
|
[](https://rubygems.org/gems/fastlane-plugin-notifyworker)
|
@@ -10,6 +18,16 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
|
|
10
18
|
fastlane add_plugin notifyworker
|
11
19
|
```
|
12
20
|
|
21
|
+
```ruby
|
22
|
+
notifyworker(
|
23
|
+
webhook = "" #str (required paramter)
|
24
|
+
api_key = "" #str (required paramter)
|
25
|
+
app_key = "" #str (required paramter)
|
26
|
+
updateDes = "" #str (optional paramter)
|
27
|
+
platform = "" #str (optional paramter(DingTalk,WeChat) default: dingTalk )
|
28
|
+
atAll = "" #bool (optional paramter)
|
29
|
+
)
|
30
|
+
```
|
13
31
|
## About notifyworker
|
14
32
|
|
15
33
|
Notify some worker App's status
|
@@ -21,7 +39,6 @@ Notify some worker App's status
|
|
21
39
|
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
22
40
|
|
23
41
|
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
|
-
|
25
42
|
## Run tests for this plugin
|
26
43
|
|
27
44
|
To run both the tests, and code style validation, run
|
@@ -8,14 +8,12 @@ module Fastlane
|
|
8
8
|
class NotifyworkerAction < Action
|
9
9
|
def self.run(params)
|
10
10
|
UI.message("The notifyworker plugin is working!")
|
11
|
-
|
12
11
|
webhook = params[:webhook]
|
13
12
|
api_key = params[:api_key]
|
14
13
|
app_key = params[:app_key]
|
15
14
|
updateDes = params[:updateDes]
|
16
15
|
platform = params[:platform]
|
17
16
|
atAll = params[:atAll]
|
18
|
-
|
19
17
|
if platform.nil?
|
20
18
|
platform = "DingTalk"
|
21
19
|
end
|
@@ -55,28 +53,29 @@ module Fastlane
|
|
55
53
|
if body["code"] != 0
|
56
54
|
UI.user_error!("Notifyworker Plugin Error: #{body["message"]}")
|
57
55
|
end
|
58
|
-
|
56
|
+
|
59
57
|
UI.message "Get app info success ..."
|
60
58
|
appInfo = body["data"]
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
app_name = "应用名称:#{appInfo["buildName"]}"
|
60
|
+
size_str = appInfo['buildFileSize']
|
61
|
+
_size = (size_str.to_i) / 1024 / 1024
|
62
|
+
app_type = "应用类型:#{appInfo["buildType"] == "1" ? "iOS" : "Android"}"
|
63
|
+
version = "版本信息:#{appInfo['buildVersion']} (Build #{appInfo['buildBuildVersion']})"
|
64
|
+
size = "应用大小:#{_size} MB"
|
65
65
|
update_time = "更新时间 :#{appInfo['buildUpdated']}"
|
66
66
|
open_url_path = "https://www.pgyer.com/#{appInfo['buildShortcutUrl']}"
|
67
67
|
download_url_path = open_url_path
|
68
|
-
|
68
|
+
pic_url = appInfo['buildQRCodeURL']
|
69
69
|
title = "请点击我测试\n#{appInfo["buildName"]}"
|
70
70
|
|
71
|
-
_updateDes = "
|
72
|
-
|
71
|
+
_updateDes = "更新内容:#{updateDes}"
|
73
72
|
if platform == "DingTalk"
|
74
73
|
|
75
74
|
_news = {
|
76
75
|
"msgtype" => "markdown",
|
77
76
|
"markdown" => {
|
78
77
|
"title" => "安装测试版",
|
79
|
-
"text" => "
|
78
|
+
"text" => "###### 应用更新提醒 \n ###### 您的应用上传了新版本 \n ##### #{app_name}\n ##### #{app_type}\n##### #{version}\n##### #{size}\n##### #{update_time}\n##### #{_updateDes}\n >  \n\n > [查看](#{download_url_path}) \n"
|
80
79
|
},
|
81
80
|
"at": {
|
82
81
|
"atMobiles" => [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-notifyworker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zlfyuan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|