fir-cli 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/fir-cli.gemspec +2 -2
- data/lib/fir/util/build_common.rb +6 -1
- data/lib/fir/util/build_ipa.rb +34 -28
- data/lib/fir/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81eb6326b7b1e1ff334ee9d2c0277dcf9e40430f
|
4
|
+
data.tar.gz: ff5a608d1a33177c964b5a16ef54606f6c08ddb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edefb7042202cbc3f1f633c7640b2e731b6e1b12adff12cd318d89f79f52eab14b7bbcc99930c0919819b05a40a0a5b41543248879d3227ba666531dd6907899
|
7
|
+
data.tar.gz: befd4d052fc98329a999a3305558134bd74eb389051ff5aa60ab2b849814aed9e5ec92e7492d761d2f7b198eacc46c9f0b9f61a65d691c896be31f003b7d3ceb
|
data/CHANGELOG
CHANGED
data/fir-cli.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
/_/ /___/_/ |_| \____/_____/___/
|
28
28
|
|
29
29
|
## 更新记录
|
30
|
-
### fir-cli 1.3.
|
31
|
-
-
|
30
|
+
### fir-cli 1.3.2
|
31
|
+
- 已经支持打包提供 app watch 的应用
|
32
32
|
- 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG
|
33
33
|
- [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源
|
34
34
|
- 欢迎 fork, issue 和 pull request
|
@@ -45,7 +45,12 @@ module FIR
|
|
45
45
|
logger.info 'Building......'
|
46
46
|
logger_info_dividing_line
|
47
47
|
|
48
|
-
|
48
|
+
status = system(@build_cmd)
|
49
|
+
|
50
|
+
unless status
|
51
|
+
logger.error 'Build failed'
|
52
|
+
exit 1
|
53
|
+
end
|
49
54
|
end
|
50
55
|
|
51
56
|
# split ['a=1', 'b=2'] => { 'a' => '1', 'b' => '2' }
|
data/lib/fir/util/build_ipa.rb
CHANGED
@@ -45,24 +45,45 @@ module FIR
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def output_ipa_and_dsym
|
48
|
-
Dir.
|
49
|
-
|
50
|
-
check_no_output_app(apps)
|
48
|
+
apps = Dir["#{@build_tmp_dir}/*.app"].sort_by(&:size)
|
49
|
+
check_no_output_app(apps)
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
ipa_name = "#{ipa_info[:name]}-#{ipa_info[:version]}-build-#{ipa_info[:build]}"
|
55
|
-
dsym_name = "#{@output_path}/#{ipa_info[:name]}.app.dSYM"
|
51
|
+
@temp_ipa = "#{@build_tmp_dir}/#{Time.now.to_i}.ipa"
|
52
|
+
archive_ipa(apps)
|
56
53
|
|
57
|
-
|
54
|
+
check_archived_ipa_is_exist
|
55
|
+
rename_ipa_and_dsym
|
58
56
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
logger.info 'Build Success'
|
58
|
+
end
|
59
|
+
|
60
|
+
def archive_ipa(apps)
|
61
|
+
logger.info 'Archiving......'
|
62
|
+
logger_info_dividing_line
|
63
|
+
|
64
|
+
@xcrun_cmd = "xcrun -sdk iphoneos PackageApplication -v #{apps.join(' ')} -o #{@temp_ipa}"
|
65
|
+
puts @xcrun_cmd if $DEBUG
|
66
|
+
logger.info `#{@xcrun_cmd}`
|
67
|
+
end
|
68
|
+
|
69
|
+
def check_archived_ipa_is_exist
|
70
|
+
unless File.exist?(@temp_ipa)
|
71
|
+
logger.error 'Archive failed'
|
72
|
+
exit 1
|
63
73
|
end
|
74
|
+
end
|
64
75
|
|
65
|
-
|
76
|
+
def rename_ipa_and_dsym
|
77
|
+
ipa_info = FIR.ipa_info(@temp_ipa)
|
78
|
+
ipa_name = "#{ipa_info[:name]}-#{ipa_info[:version]}-build-#{ipa_info[:build]}"
|
79
|
+
dsym_name = "#{@output_path}/#{ipa_info[:name]}.app.dSYM"
|
80
|
+
|
81
|
+
@builded_app_path = "#{@output_path}/#{ipa_name}.ipa"
|
82
|
+
|
83
|
+
FileUtils.mv(@temp_ipa, @builded_app_path, force: true)
|
84
|
+
if File.exist?(dsym_name)
|
85
|
+
FileUtils.mv(dsym_name, "#{@output_path}/#{ipa_name}.app.dSYM", force: true)
|
86
|
+
end
|
66
87
|
end
|
67
88
|
|
68
89
|
def upload_build_dsym_mapping_file
|
@@ -124,20 +145,5 @@ module FIR
|
|
124
145
|
exit 1
|
125
146
|
end
|
126
147
|
end
|
127
|
-
|
128
|
-
def zip_app2ipa(app_path)
|
129
|
-
ipa_path = Tempfile.new(['temp', '.ipa']).path
|
130
|
-
|
131
|
-
Dir.mktmpdir do |tmpdir|
|
132
|
-
Dir.chdir(tmpdir) do
|
133
|
-
Dir.mkdir('Payload')
|
134
|
-
FileUtils.cp_r(app_path, 'Payload')
|
135
|
-
system("rm -rf #{ipa_path}") if File.file?(ipa_path)
|
136
|
-
system("zip -qr #{ipa_path} Payload")
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
ipa_path
|
141
|
-
end
|
142
148
|
end
|
143
149
|
end
|
data/lib/fir/version.rb
CHANGED
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.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NaixSpirit
|
@@ -196,9 +196,9 @@ metadata: {}
|
|
196
196
|
post_install_message: "\n ______________ ________ ____\n /
|
197
197
|
____/ _/ __ \\ / ____/ / / _/\n / /_ / // /_/ /_____/ / / / /
|
198
198
|
/\n / __/ _/ // _, _/_____/ /___/ /____/ /\n /_/ /___/_/ |_| \\____/_____/___/\n\n
|
199
|
-
\ ## 更新记录\n ### fir-cli 1.3.
|
200
|
-
|
201
|
-
|
199
|
+
\ ## 更新记录\n ### fir-cli 1.3.2\n - 已经支持打包提供 app watch 的应用\n - 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG\n
|
200
|
+
\ - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源\n - 欢迎 fork, issue 和 pull
|
201
|
+
request\n "
|
202
202
|
rdoc_options: []
|
203
203
|
require_paths:
|
204
204
|
- lib
|