fir-cli 1.2.8 → 1.2.9

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
  SHA1:
3
- metadata.gz: 1e71b65b2924de16756c2864e7a094de63c956d8
4
- data.tar.gz: 7bac50ecf47385a4910edc0a2880e728ff15cd2d
3
+ metadata.gz: ba21bf45fa66a3258e0487843c45b2c5fa3aa079
4
+ data.tar.gz: 1817005f1c05b9665443c9fe27a768ff515dfb96
5
5
  SHA512:
6
- metadata.gz: 1f0b6fe17268b80f01364036396c1852deaf460d7b10210df7fa78cffb6be1d3532d46aa198924f33426d0ba32aaca7729066954df43d06dbc71511ebbd4102d
7
- data.tar.gz: cba928b8e03b835180a6a72291766f810aa69df817a737ff0fee2ba4975dffd397ae19d46da31a88cb6bc4da945ec76b119e8c4f2d3140189667a299ac0ca858
6
+ metadata.gz: 64ae9b0ae7f0f1e33559ff95f3948f68f09aace41ce7632283e63637fa4540eaea045799f2ec35d00dee4071abcc9f1f35f528de454e2f2500bc65ba59789087
7
+ data.tar.gz: 235d964b9effb042741f32408fa36f242e197cb7a3067e2523e698e30ac44c1ff77e4020d8f9bc6166beedc8882152e66eae923c813f936438b8fb3033779d8c
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  ## 更新记录
2
2
 
3
+ ### fir-cli 1.2.9
4
+ - 修复指定 output_path 后, publish 默认查找第一个 app 的 bug
5
+ - 暂时不支持 build multi apps
6
+
3
7
  ### fir-cli 1.2.8
4
8
  - 统一 build 后, ipa 和 dSYM 文件的命名
5
9
 
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  fir.im-cli
2
2
  ---
3
3
 
4
-
5
4
  ![Build Status Images](https://travis-ci.org/FIRHQ/fir-cli.svg)
6
5
  [![Code Climate](https://codeclimate.com/github/FIRHQ/fir-cli/badges/gpa.svg)](https://codeclimate.com/github/FIRHQ/fir-cli)
7
6
  [![Test Coverage](https://codeclimate.com/github/FIRHQ/fir-cli/badges/coverage.svg)](https://codeclimate.com/github/FIRHQ/fir-cli/coverage)
@@ -19,6 +18,12 @@ fir.im-cli 使用 Ruby 构建,只要安装相应 ruby gem 即可:
19
18
  $ sudo gem install fir-cli
20
19
  ```
21
20
 
21
+ 如果是 OS X 系统, 需要提前安装好 osx command line tools:
22
+
23
+ ```shell
24
+ $ xcode-select --install
25
+ ```
26
+
22
27
  如果出现无法安装的现象, 请先更换 Ruby 的淘宝源(由于国内网络原因, 你懂的), 并升级下系统自带的 gem
23
28
 
24
29
  ```shell
data/fir-cli.gemspec CHANGED
@@ -27,12 +27,9 @@ Gem::Specification.new do |spec|
27
27
  /_/ /___/_/ |_| \____/_____/___/
28
28
 
29
29
  ## 更新记录
30
- ### fir-cli 1.2.8
31
- - 统一 build 后, ipa dSYM 文件的命名
32
- - publish 时增加更多信息
33
- - 增加导出二维码功能
34
- - 使用 `fir p <app file path> -Q`
35
- - 或者 `fir bi(ba) <project dir> -p -Q` 即可导出当前 app 的二维码图片
30
+ ### fir-cli 1.2.9
31
+ - 修复指定 output_path 后, publish 默认查找第一个 app 的 bug
32
+ - 暂时不支持 build multi apps
36
33
  - 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG
37
34
  - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源
38
35
  - 欢迎 fork, issue 和 pull request
@@ -12,7 +12,6 @@ module FIR
12
12
  logger_info_and_run_build_command
13
13
 
14
14
  output_ipa_and_dsym
15
- @builded_app_path = Dir["#{@output_path}/*.ipa"].first
16
15
 
17
16
  publish_build_app if options.publish?
18
17
  upload_build_dsym_mapping_file if options.mapping?
@@ -48,18 +47,18 @@ module FIR
48
47
  def output_ipa_and_dsym
49
48
  Dir.chdir(@build_tmp_dir) do
50
49
  apps = Dir['*.app']
51
- check_no_output_app(apps)
50
+ check_no_output_app_and_multi_apps(apps)
52
51
 
53
- apps.each do |app|
54
- temp_ipa = zip_app2ipa(File.join(@build_tmp_dir, app))
55
- ipa_info = FIR.ipa_info(temp_ipa)
56
- ipa_name = "#{ipa_info[:name]}-#{ipa_info[:version]}-build-#{ipa_info[:build]}"
57
- dsym_name = "#{@output_path}/#{ipa_info[:name]}.app.dSYM"
52
+ temp_ipa = zip_app2ipa(File.join(@build_tmp_dir, apps.first))
53
+ ipa_info = FIR.ipa_info(temp_ipa)
54
+ ipa_name = "#{ipa_info[:name]}-#{ipa_info[:version]}-build-#{ipa_info[:build]}"
55
+ dsym_name = "#{@output_path}/#{ipa_info[:name]}.app.dSYM"
58
56
 
59
- FileUtils.cp(temp_ipa, "#{@output_path}/#{ipa_name}.ipa")
60
- if File.exist?(dsym_name)
61
- FileUtils.mv(dsym_name, "#{@output_path}/#{ipa_name}.app.dSYM")
62
- end
57
+ @builded_app_path = "#{@output_path}/#{ipa_name}.ipa"
58
+
59
+ FileUtils.mv(temp_ipa, @builded_app_path, force: true)
60
+ if File.exist?(dsym_name)
61
+ FileUtils.mv(dsym_name, "#{@output_path}/#{ipa_name}.app.dSYM", force: true)
63
62
  end
64
63
  end
65
64
 
@@ -119,11 +118,16 @@ module FIR
119
118
  end
120
119
  end
121
120
 
122
- def check_no_output_app(apps)
121
+ def check_no_output_app_and_multi_apps(apps)
123
122
  if apps.length == 0
124
123
  logger.error 'Builded has no output app, Can not be packaged'
125
124
  exit 1
126
125
  end
126
+
127
+ if apps.length > 1
128
+ logger.error 'Builded multi apps, Not supported'
129
+ exit 1
130
+ end
127
131
  end
128
132
 
129
133
  def zip_app2ipa(app_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.2.8'
4
+ VERSION = '1.2.9'
5
5
  end
data/test/test_helper.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'codeclimate-test-reporter'
4
+ CodeClimate::TestReporter.start
5
+
3
6
  require 'minitest/autorun'
4
7
  require 'ostruct'
5
8
  require 'fir'
6
- require 'codeclimate-test-reporter'
7
- CodeClimate::TestReporter.start
8
9
 
9
10
  FIR.logger = Logger.new(STDOUT)
10
11
 
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.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaixSpirit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-23 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -196,9 +196,8 @@ metadata: {}
196
196
  post_install_message: "\n ______________ ________ ____\n /
197
197
  ____/ _/ __ \\ / ____/ / / _/\n / /_ / // /_/ /_____/ / / / /
198
198
  /\n / __/ _/ // _, _/_____/ /___/ /____/ /\n /_/ /___/_/ |_| \\____/_____/___/\n\n
199
- \ ## 更新记录\n ### fir-cli 1.2.8\n - 统一 build 后, ipa dSYM 文件的命名\n - publish 时增加更多信息\n
200
- \ - 增加导出二维码功能\n - 使用 `fir p <app file path> -Q`\n - 或者 `fir bi(ba) <project dir>
201
- -p -Q` 即可导出当前 app 的二维码图片\n - 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG\n
199
+ \ ## 更新记录\n ### fir-cli 1.2.9\n - 修复指定 output_path 后, publish 默认查找第一个 app bug\n
200
+ \ - 暂时不支持 build multi apps\n - 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG\n
202
201
  \ - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源\n - 欢迎 fork, issue 和 pull
203
202
  request\n "
204
203
  rdoc_options: []