fastlane-plugin-goyuyun 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: 6476f7c95190b82f8c6d0cb3a8bd6de7c6893fdab1ce8e400d636da4da0c975d
|
4
|
+
data.tar.gz: dff2b0cc0ee928ebe21bee25a3a9f627a14d38edc4f091bda655119994e28902
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b9e793c5f6ce89ab45b3c24f33cbd5257da6894554f07368b46708a1b65f9a0095273232d006ddce452a4c58de30845d0112ce2afb7f49af25e186ac4b08a92
|
7
|
+
data.tar.gz: 2b4fd284b9808b6d222192882d8dddc6475cfb1bc813097a9dcddea49e404bfde6a1df05c57fb25e0b05def4c6b8024b6f44ac22922869e333c2fe5ecff2ac34
|
@@ -5,7 +5,7 @@ module Fastlane
|
|
5
5
|
module Actions
|
6
6
|
class GoyuyunAction < Action
|
7
7
|
def self.run(params)
|
8
|
-
UI.message("The goyuyun plugin is working
|
8
|
+
UI.message("The goyuyun plugin is working!")
|
9
9
|
|
10
10
|
api_host = "http://www.tgvia.com/apiv1/app/upload"
|
11
11
|
api_token = params[:api_token]
|
@@ -19,7 +19,7 @@ module Fastlane
|
|
19
19
|
UI.user_error!("You have to provide a build file")
|
20
20
|
end
|
21
21
|
|
22
|
-
UI.message
|
22
|
+
UI.message("build_file: #{build_file}")
|
23
23
|
|
24
24
|
password = params[:password]
|
25
25
|
if password.nil?
|
@@ -45,10 +45,10 @@ module Fastlane
|
|
45
45
|
}
|
46
46
|
|
47
47
|
goyuyun_client = Faraday.new(nil, conn_options) do |c|
|
48
|
-
c.request
|
49
|
-
c.request
|
50
|
-
c.response
|
51
|
-
c.adapter
|
48
|
+
c.request(:multipart)
|
49
|
+
c.request(:url_encoded)
|
50
|
+
c.response(:json, content_type: /\bjson$/)
|
51
|
+
c.adapter(:net_http)
|
52
52
|
end
|
53
53
|
|
54
54
|
params = {
|
@@ -58,16 +58,16 @@ module Fastlane
|
|
58
58
|
'file' => Faraday::UploadIO.new(build_file, 'application/octet-stream')
|
59
59
|
}
|
60
60
|
|
61
|
-
UI.message
|
61
|
+
UI.message("Start upload #{build_file} to goyuyun...")
|
62
62
|
|
63
|
-
response = goyuyun_client.post
|
63
|
+
response = goyuyun_client.post(api_host, params)
|
64
64
|
info = response.body
|
65
65
|
|
66
66
|
if info['code'] != 0
|
67
67
|
UI.user_error!("GOYUYUN Plugin Error: #{info['message']}")
|
68
68
|
end
|
69
69
|
|
70
|
-
UI.success
|
70
|
+
UI.success("Upload success. ")
|
71
71
|
# UI.success "Upload success. Visit this URL to see: https://www.goyuyun.com/#{info['data']['appShortcutUrl']}"
|
72
72
|
end
|
73
73
|
|
@@ -100,50 +100,50 @@ module Fastlane
|
|
100
100
|
description: "api_token in your GOYUYUN account",
|
101
101
|
optional: false,
|
102
102
|
type: String),
|
103
|
-
# FastlaneCore::ConfigItem.new(key: :user_key,
|
104
|
-
# env_name: "GOYUYUN_USER_KEY",
|
105
|
-
# description: "user_key in your GOYUYUN account",
|
106
|
-
# optional: false,
|
107
|
-
# type: String),
|
108
|
-
FastlaneCore::ConfigItem.new(key: :apk,
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
FastlaneCore::ConfigItem.new(key: :ipa,
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
FastlaneCore::ConfigItem.new(key: :password,
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
FastlaneCore::ConfigItem.new(key: :update_description,
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
FastlaneCore::ConfigItem.new(key: :install_type,
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
103
|
+
# FastlaneCore::ConfigItem.new(key: :user_key,
|
104
|
+
# env_name: "GOYUYUN_USER_KEY",
|
105
|
+
# description: "user_key in your GOYUYUN account",
|
106
|
+
# optional: false,
|
107
|
+
# type: String),
|
108
|
+
FastlaneCore::ConfigItem.new(key: :apk,
|
109
|
+
env_name: "GOYUYUN_APK",
|
110
|
+
description: "Path to your APK file",
|
111
|
+
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
|
112
|
+
optional: true,
|
113
|
+
verify_block: proc do |value|
|
114
|
+
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
|
115
|
+
end,
|
116
|
+
conflicting_options: [:ipa],
|
117
|
+
conflict_block: proc do |value|
|
118
|
+
UI.user_error!("You can't use 'apk' and '#{value.key}' options in one run")
|
119
|
+
end),
|
120
|
+
FastlaneCore::ConfigItem.new(key: :ipa,
|
121
|
+
env_name: "GOYUYUN_IPA",
|
122
|
+
description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action. For Mac zip the .app. For Android provide path to .apk file",
|
123
|
+
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
124
|
+
optional: true,
|
125
|
+
verify_block: proc do |value|
|
126
|
+
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
|
127
|
+
end,
|
128
|
+
conflicting_options: [:apk],
|
129
|
+
conflict_block: proc do |value|
|
130
|
+
UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run")
|
131
|
+
end),
|
132
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
133
|
+
env_name: "GOYUYUN_PASSWORD",
|
134
|
+
description: "set password to protect app",
|
135
|
+
optional: true,
|
136
|
+
type: String),
|
137
|
+
FastlaneCore::ConfigItem.new(key: :update_description,
|
138
|
+
env_name: "GOYUYUN_UPDATE_DESCRIPTION",
|
139
|
+
description: "set update description for app",
|
140
|
+
optional: true,
|
141
|
+
type: String),
|
142
|
+
FastlaneCore::ConfigItem.new(key: :install_type,
|
143
|
+
env_name: "GOYUYUN_INSTALL_TYPE",
|
144
|
+
description: "set install type for app (1=public, 2=password, 3=invite). Please set as a string",
|
145
|
+
optional: true,
|
146
|
+
type: String)
|
147
147
|
]
|
148
148
|
end
|
149
149
|
|