fir-cli 1.3.6 → 1.3.7

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
  SHA1:
3
- metadata.gz: 2f3f4e92a079da9de49f324cdb3929c29d08de75
4
- data.tar.gz: b533093fa321bd7761ccb02335c825a44314c8c0
3
+ metadata.gz: 3e561175c5a335be3b135439097dd39bdc66c726
4
+ data.tar.gz: e2f77fc9e7bfab9a328da190567aa105d7c10c82
5
5
  SHA512:
6
- metadata.gz: eb98e207db717384ab121ffca6485cb28b5526b01fef5fb187ba5bd660d9ff0dc3aa6ac458814a10a2183dcedc646f97219a5def3ac0728f61aecda7bada5cbe
7
- data.tar.gz: 7ccb81cf640a3363e5c8983602252e8fb645269d0484294b725fd93dd5e93ccc8aa06aad52cc51d762654a327b9ca08dcdca18b9ab6d859a9b87d42c44ec8506
6
+ metadata.gz: ef8e450345f05f761c977bf32781e06b4d294b7e39283ba2fbac5e82b1fa4e0fb53266970a8187fc4672d004669e55414fe8f3747a311d999fe595f15c77feb9
7
+ data.tar.gz: cd7f47ce2b285e89f6a25f1e2439d21770f2d7e05b0048623638ff1af3093ce3a04287e8b4f546b1f2b3beb3cd8d96e4d6ac0ba49fa08b0a587d3745cc9d5a09
data/CHANGELOG CHANGED
@@ -1,5 +1,8 @@
1
1
  ## 更新记录
2
2
 
3
+ ### fir-cli 1.3.7
4
+ - 支持直接从文件读取 changelog
5
+
3
6
  ### fir-cli 1.3.6
4
7
  - 增加自定义 build 后 ipa, apk 的 name
5
8
 
data/README.md CHANGED
@@ -228,7 +228,7 @@ $ fir upgrade
228
228
 
229
229
  ## 捐赠支持
230
230
 
231
- 如果你觉得 fir-cli 对你有所帮助, 欢迎打赏支持作者:smile:
231
+ 如果你觉得 fir-cli 对你有所帮助, 欢迎微信打赏支持作者:smile:
232
232
 
233
233
  ![](http://7rf35s.com1.z0.glb.clouddn.com/coffee.png)
234
234
 
data/fir-cli.gemspec CHANGED
@@ -27,7 +27,8 @@ Gem::Specification.new do |spec|
27
27
  /_/ /___/_/ |_| \____/_____/___/
28
28
 
29
29
  ## 更新记录
30
- ### fir-cli 1.3.6
30
+ ### fir-cli 1.3.7
31
+ - 支持直接从文件读取 changelog
31
32
  - 增加 -n 参数自定义 build 后 ipa, apk 的 name
32
33
  - 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG
33
34
  - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源
data/lib/fir/cli.rb CHANGED
@@ -56,7 +56,7 @@ module FIR
56
56
  method_option :publish, type: :boolean, aliases: '-p', desc: 'true/false if publish to fir.im'
57
57
  method_option :short, type: :string, aliases: '-s', desc: 'Set custom short link if publish to fir.im'
58
58
  method_option :name, type: :string, aliases: '-n', desc: 'Set custom apk name when builded'
59
- method_option :changelog, type: :string, aliases: '-c', desc: 'Set changelog if publish to fir.im'
59
+ method_option :changelog, type: :string, aliases: '-c', desc: 'Set changelog if publish to fir.im, support string/file'
60
60
  method_option :qrcode, type: :boolean, aliases: '-Q', desc: 'Generate qrcode'
61
61
  def build_apk(*args)
62
62
  prepare :build_apk
@@ -153,11 +153,16 @@ module FIR
153
153
  @file_path = File.absolute_path(args.first.to_s)
154
154
  @file_type = File.extname(@file_path).delete('.')
155
155
  @token = options[:token] || current_token
156
- @changelog = options[:changelog].to_s.to_utf8
156
+ @changelog = read_changelog(options[:changelog]).to_s.to_utf8
157
157
  @short = options[:short].to_s
158
158
  @export_qrcode = !!options[:qrcode]
159
159
  end
160
160
 
161
+ def read_changelog(changelog)
162
+ return if changelog.blank?
163
+ File.exist?(changelog) ? File.read(changelog) : changelog
164
+ end
165
+
161
166
  def check_supported_file_and_token
162
167
  check_file_exist(@file_path)
163
168
  check_supported_file(@file_path)
data/lib/fir/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module FIR
4
- VERSION = '1.3.6'
4
+ VERSION = '1.3.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fir-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaixSpirit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-02 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -199,9 +199,10 @@ metadata: {}
199
199
  post_install_message: "\n ______________ ________ ____\n /
200
200
  ____/ _/ __ \\ / ____/ / / _/\n / /_ / // /_/ /_____/ / / / /
201
201
  /\n / __/ _/ // _, _/_____/ /___/ /____/ /\n /_/ /___/_/ |_| \\____/_____/___/\n\n
202
- \ ## 更新记录\n ### fir-cli 1.3.6\n - 增加 -n 参数自定义 build 后 ipa, apk 的 name\n - 详细更新记录,
203
- 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG\n - [fir-cli](https://github.com/FIRHQ/fir-cli)
204
- 已经开源\n - 欢迎 fork, issue 和 pull request\n "
202
+ \ ## 更新记录\n ### fir-cli 1.3.7\n - 支持直接从文件读取 changelog\n - 增加 -n 参数自定义 build 后
203
+ ipa, apk 的 name\n - 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG\n
204
+ \ - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源\n - 欢迎 fork, issue 和 pull
205
+ request\n "
205
206
  rdoc_options: []
206
207
  require_paths:
207
208
  - lib