fir-cli 1.6.4 → 1.6.6.beta1

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: 2112018904f94b190bc088220e41715575330d9e
4
- data.tar.gz: c916bac62f787fe02bb83db9f65e4fd7ceefd715
3
+ metadata.gz: 3ba0f4ae8a95ea25c9eb921cda0e2960b0bfe8ba
4
+ data.tar.gz: 8fb23974060648a2ddb910796b4a046ccedb8b96
5
5
  SHA512:
6
- metadata.gz: 547a43a639b6070a3c1d5eda6eb8009ed550999dc10ef95fe513e12d7c21451ab597ccfa84dc92d8ec6d218f780d7d2e9f85c50b3dd08f87e8e27617d8e2bba0
7
- data.tar.gz: a4e8ad6a3358a06a1ef306ef22f0ad48949968f5774eb0330f71692185e1cc9f8915a487151982544ec3567ff0855131d1791f33b317208e3a02594a9dfdbcd6
6
+ metadata.gz: 58679a62595394041083b64542a8c51d21457e363b7a713672387ad00d7d1e426bcb057d312a3746dbf7d5285fa428bba0dda5c0f2fc1fcd4ee8f5539913dfa9
7
+ data.tar.gz: 9c2699f29cbb7aa03b9f163449a283378d6d59b42f84d7608c0852f3990be69d18040a24b07951870f7c81326b7233e6a4e94ec1b8eb798d80ce16d6b1694a2a
data/Dockerfile CHANGED
@@ -2,11 +2,7 @@ FROM ruby:2.4.2
2
2
 
3
3
  ENV WORKDIR=/fir-cli
4
4
  ENV HOME=/fir-cli
5
-
6
5
  RUN gem install fir-cli
7
-
8
6
  RUN mkdir -p $WORKDIR
9
-
10
7
  WORKDIR $WORKDIR
11
-
12
- CMD ["fir"]
8
+ ENTRYPOINT ["fir"]
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ else
5
5
  source 'http://gems.ruby-china.org'
6
6
  end
7
7
 
8
+ # gem 'byebug'
8
9
  # Specify your gem's dependencies in fir.gemspec
9
10
  gemspec
10
11
 
data/README.md CHANGED
@@ -11,9 +11,11 @@
11
11
  fir.im-cli 可以通过指令查看, 上传, iOS/Android 应用.
12
12
 
13
13
  ![fir-cli](http://7rf35s.com1.z0.glb.clouddn.com/fir-cli-new.gif)
14
- ## 重要提示
14
+
15
+
16
+ # 重要提示
15
17
  - 由于部分地区上传时遇到的证书问题, 新版本默认忽略证书校验. 如需打开, 请在命令前加入`UPLOAD_VERIFY_SSL=1`
16
- - 介于在ios 等编译越来越复杂化, fir-cli 自带的编译功能较为简单, 不能很好的满足用户需求, 推荐用户使用 fastlane (fastlane gym)进行打包,生成好 ipa 文件后,再使用 fir publish 上传生成的ipa
18
+ - 介于在ios 等编译越来越复杂化, fir-cli 自带的 `build_ipa` 编译功能较为简单, 不能很好的满足用户需求, 推荐用户使用 fastlane (fastlane gym)进行打包,生成好 ipa 文件后,再使用 `fir publish` 上传生成的ipa
17
19
 
18
20
  ## 文档
19
21
 
@@ -35,6 +37,12 @@ chmod +x /usr/local/bin/fir
35
37
  fir login token
36
38
  fir help
37
39
  ```
40
+ ## 近期计划(2018年03-04月)
41
+ - 集成 fastlane gym ,取代原有的 build_ipa 功能
42
+ - 增加上传完毕后反馈 release_id
43
+ - 修复 changelog 不能换行的问题
44
+ - 完善docker 版本, 用户可以直接挂载文件目录上传
45
+
38
46
  ## 提交反馈
39
47
 
40
48
  - 联系微信 `atpking`
data/doc/install.md CHANGED
@@ -22,16 +22,16 @@ $ gem install fir-cli
22
22
 
23
23
  - 出现 `Gem::RemoteFetcher::FetchError` 相关错误:
24
24
 
25
- 更换 Ruby 的淘宝源(由于国内网络原因, 你懂的), 并升级下系统自带的 gem
25
+ 更换 Ruby 的源(由于国内网络原因, 你懂的), 并升级下系统自带的 gem
26
26
 
27
27
  ```sh
28
28
  $ gem sources --remove https://rubygems.org/
29
- $ gem sources -a https://ruby.taobao.org/
29
+ $ gem sources -a https://gems.ruby-china.org/
30
30
  $ gem sources -l
31
31
  *** CURRENT SOURCES ***
32
32
 
33
- https://ruby.taobao.org
34
- # 请确保只有 ruby.taobao.org, 如果有其他的源, 请 remove 掉
33
+ https://gems.ruby-china.org
34
+ # 请确保只有 gems.ruby-china.org, 如果有其他的源, 请 remove 掉
35
35
 
36
36
  gem update --system
37
37
  gem install fir-cli
data/fir-cli.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  /_/ /___/_/ |_| \____/_____/___/
28
28
 
29
29
  ## 更新记录
30
- - 忽略了证书错误
30
+ - 推荐用户使用 fastlane gym build ipa文件
31
31
  - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源
32
32
  - 欢迎 fork, issue 和 pull request
33
33
  )
@@ -42,6 +42,6 @@ Gem::Specification.new do |spec|
42
42
  spec.add_dependency 'rest-client', '~> 2.0'
43
43
  spec.add_dependency 'ruby_android', '~> 0.7.7'
44
44
  spec.add_dependency 'rqrcode', '~> 0.7'
45
- spec.add_dependency 'xcodeproj', '~> 1.5'
46
- spec.add_dependency 'api_tools'
45
+ spec.add_dependency 'api_tools'
46
+ spec.add_dependency 'xcodeproj'
47
47
  end
data/lib/fir.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'thor'
4
+ # require 'byebug'
4
5
  require 'logger'
5
6
  require 'yaml'
6
7
  require 'rest-client'
data/lib/fir/cli.rb CHANGED
@@ -94,6 +94,7 @@ module FIR
94
94
  long_desc <<-LONGDESC
95
95
  `publish` command will publish your app file to fir.im, also the command support to publish app's short & changelog.
96
96
 
97
+
97
98
  Example:
98
99
 
99
100
  $ fir p <app file path> [-c <changelog> -s <custom short link> -Q -T <your api token>]
@@ -106,6 +107,8 @@ module FIR
106
107
  method_option :short, type: :string, aliases: '-s', desc: 'Set custom short link'
107
108
  method_option :changelog, type: :string, aliases: '-c', desc: 'Set changelog'
108
109
  method_option :qrcode, type: :boolean, aliases: '-Q', desc: 'Generate qrcode'
110
+ method_option :show_release_id, type: :boolean, aliases: '-r', desc: 'show release id'
111
+
109
112
  method_option :mappingfile, type: :string, aliases: '-m', desc: 'App mapping file'
110
113
  method_option :proj, type: :string, aliases: '-P', desc: 'Project id in BugHD.com if upload app mapping file'
111
114
  method_option :open, type: :boolean, desc: 'true/false if open for everyone'
@@ -5,6 +5,7 @@ module FIR
5
5
  module BuildIpa
6
6
 
7
7
  def build_ipa(*args, options)
8
+
8
9
  logger.warn "fir build ipa 即将过期, 请及时迁移打包部分, 推荐使用 fastlane gym"
9
10
  initialize_build_common_options(args, options)
10
11
 
@@ -4,7 +4,7 @@ module FIR
4
4
  module Config
5
5
  CONFIG_PATH = "#{ENV['HOME']}/.fir-cli"
6
6
  APP_INFO_PATH = "#{ENV['HOME']}/.fir-cli-app"
7
- API_YML_PATH = File.expand_path('../../', __FILE__) + '/api.yml'
7
+ API_YML_PATH = ENV['API_YML_PATH'] || File.expand_path('../../', __FILE__) + '/api.yml'
8
8
  XCODE_WRAPPER_PATH = File.expand_path('../../', __FILE__) + '/xcode_wrapper.sh'
9
9
  APP_FILE_TYPE = %w(.ipa .apk).freeze
10
10
 
@@ -34,6 +34,7 @@ module FIR
34
34
  end
35
35
 
36
36
  def current_token
37
+ return @token = ENV["API_TOKEN"] if ENV["API_TOKEN"]
37
38
  @token ||= config[:token] if config
38
39
  end
39
40
 
data/lib/fir/util/info.rb CHANGED
@@ -25,7 +25,6 @@ module FIR
25
25
  ipa = FIR::Parser::Ipa.new(ipa_path)
26
26
  app = ipa.app
27
27
  info = app.full_info(options)
28
-
29
28
  ipa.cleanup
30
29
  info
31
30
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  module FIR
4
4
  module Login
5
-
6
5
  def login(token)
7
6
  check_token_cannot_be_blank token
8
7
 
@@ -19,6 +19,11 @@ module FIR
19
19
  logger_info_app_short_and_qrcode
20
20
 
21
21
  upload_mapping_file_with_publish(options)
22
+ if options[:show_release_id]
23
+ sleep 2
24
+ release_info = fetch_release_id
25
+ logger.info "release id = #{release_info[:id]}"
26
+ end
22
27
  logger_info_blank_line
23
28
  end
24
29
 
@@ -40,7 +45,10 @@ module FIR
40
45
  upload_app_binary
41
46
  upload_device_info
42
47
  update_app_info
48
+
43
49
  fetch_app_info
50
+
51
+
44
52
  end
45
53
 
46
54
  %w(binary icon).each do |word|
@@ -68,7 +76,6 @@ module FIR
68
76
  def uploading_icon_info
69
77
  large_icon_path = @app_info[:icons].max_by { |f| File.size(f) }
70
78
  uncrushed_icon_path = convert_icon(large_icon_path)
71
-
72
79
  {
73
80
  key: @icon_cert[:key],
74
81
  token: @icon_cert[:token],
@@ -121,6 +128,10 @@ module FIR
121
128
  api_token: @token
122
129
  end
123
130
 
131
+ def fetch_release_id
132
+ get "#{fir_api[:base_url]}/apps/#{@app_id}/releases/find_release_by_key", api_token: @token, key: @binary_cert[:key]
133
+ end
134
+
124
135
  def fetch_app_info
125
136
  logger.info 'Fetch app info from fir.im'
126
137
 
data/lib/fir/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module FIR
4
- VERSION = '1.6.4'
4
+ VERSION = '1.6.6.beta1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fir-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.6.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaixSpirit
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-22 00:00:00.000000000 Z
12
+ date: 2018-03-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -138,21 +138,21 @@ dependencies:
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0.7'
140
140
  - !ruby/object:Gem::Dependency
141
- name: xcodeproj
141
+ name: api_tools
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - "~>"
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
- version: '1.5'
146
+ version: '0'
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - "~>"
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
- version: '1.5'
153
+ version: '0'
154
154
  - !ruby/object:Gem::Dependency
155
- name: api_tools
155
+ name: xcodeproj
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - ">="
@@ -247,8 +247,8 @@ metadata: {}
247
247
  post_install_message: "\n ______________ ________ ____\n /
248
248
  ____/ _/ __ \\ / ____/ / / _/\n / /_ / // /_/ /_____/ / / / /
249
249
  /\n / __/ _/ // _, _/_____/ /___/ /____/ /\n /_/ /___/_/ |_| \\____/_____/___/\n\n
250
- \ ## 更新记录\n - 忽略了证书错误\n - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源\n -
251
- 欢迎 fork, issue 和 pull request\n "
250
+ \ ## 更新记录\n - 推荐用户使用 fastlane gym build ipa文件 \n - [fir-cli](https://github.com/FIRHQ/fir-cli)
251
+ 已经开源\n - 欢迎 fork, issue 和 pull request\n "
252
252
  rdoc_options: []
253
253
  require_paths:
254
254
  - lib
@@ -259,9 +259,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
259
  version: '0'
260
260
  required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - ">="
262
+ - - ">"
263
263
  - !ruby/object:Gem::Version
264
- version: '0'
264
+ version: 1.3.1
265
265
  requirements: []
266
266
  rubyforge_project:
267
267
  rubygems_version: 2.6.14