Module: FIR::Publish
Instance Method Summary
collapse
#dingtalk_notifier, #feishu_notifier, #notify_to_thirds, #wxwork_notifier
Instance Method Details
#fetch_app_info ⇒ Object
50
51
52
53
54
55
56
57
58
|
# File 'lib/fir/util/publish.rb', line 50
def fetch_app_info
logger.info 'Fetch app info from fir.im'
fir_app_info = get(fir_api[:app_url] + "/#{@app_id}", api_token: @token)
write_app_info(id: fir_app_info[:id],
short: fir_app_info[:short],
name: fir_app_info[:name])
fir_app_info
end
|
#publish(*args, options) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/fir/util/publish.rb', line 14
def publish(*args, options)
initialize_publish_options(args, options)
logger_info_publishing_message
logger.info 'begin to upload ...'
logger.info "fir-cli version #{FIR::VERSION} (#{RUBY_VERSION} @ #{RUBY_PLATFORM})"
received_app_info = upload_app
short = received_app_info[:short]
download_domain = received_app_info[:download_domain]
release_id = received_app_info[:release_id]
logger.info 'end upload'
logger_info_dividing_line
download_url = build_download_url(download_domain, short, release_id)
logger.info "Published succeed: #{download_url}"
qrcode_path = build_qrcode download_url
notify_to_thirds(download_url, qrcode_path)
upload_mapping_file_with_publish
upload_fir_cli_usage_info(received_app_info)
logger_info_blank_line
{
app_id: @app_id,
release_id: release_id,
short: short
}
end
|