fir-cli 1.2.8 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/README.md +6 -1
- data/fir-cli.gemspec +3 -6
- data/lib/fir/util/build_ipa.rb +16 -12
- data/lib/fir/version.rb +1 -1
- data/test/test_helper.rb +3 -2
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba21bf45fa66a3258e0487843c45b2c5fa3aa079
|
4
|
+
data.tar.gz: 1817005f1c05b9665443c9fe27a768ff515dfb96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ae9b0ae7f0f1e33559ff95f3948f68f09aace41ce7632283e63637fa4540eaea045799f2ec35d00dee4071abcc9f1f35f528de454e2f2500bc65ba59789087
|
7
|
+
data.tar.gz: 235d964b9effb042741f32408fa36f242e197cb7a3067e2523e698e30ac44c1ff77e4020d8f9bc6166beedc8882152e66eae923c813f936438b8fb3033779d8c
|
data/CHANGELOG
CHANGED
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.
|
31
|
-
-
|
32
|
-
-
|
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
|
data/lib/fir/util/build_ipa.rb
CHANGED
@@ -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
|
-
|
50
|
+
check_no_output_app_and_multi_apps(apps)
|
52
51
|
|
53
|
-
apps.
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
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
|
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
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.
|
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-
|
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.
|
200
|
-
\ -
|
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: []
|