fir-cli 0.1.3 → 0.1.8
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 +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +9 -6
- data/README.md +70 -33
- data/bin/fir +7 -4
- data/fir-cli.gemspec +15 -9
- data/fir-cli.rb +4 -5
- data/lib/fir-cli/version.rb +5 -0
- data/lib/fir-cli-commands/config.rb +7 -6
- data/lib/fir-cli-commands/info.rb +5 -5
- data/lib/fir-cli-commands/login.rb +10 -10
- data/lib/fir-cli-commands/profile.rb +31 -0
- data/lib/fir-cli-commands/publish.rb +17 -13
- data/lib/fir-cli-commands/resign.rb +19 -16
- data/lib/fir-cli-commands/upgrade.rb +6 -6
- data/lib/fir-cli-commands/version.rb +10 -0
- data/lib/fir-cli.core.ext.rb +13 -7
- data/lib/fir-cli.utils.ext.rb +74 -33
- data/lib/lagunitas.ext.rb +1 -1
- data/lib/user_config.patch.rb +10 -0
- metadata +44 -13
- data/lib/fir-cli-commands/update.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9734a2a6211d82d058df273bd03c91cf9cc51f0a
|
4
|
+
data.tar.gz: f58003855b7eb3e568ce73171f18163e57dc001c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cc3a636a04a3c8adbe755803bc1ad55ca543b44cb430ab93c3f4610bf627ff05117f6c47919a093000bec9e76f10dbc5164cd0ae365e4924819ab944bb5ba6b
|
7
|
+
data.tar.gz: 737c734728115877b142729fae596a9d1b036616a34013d7d06e83a972d8d16f7ff235bcad7c625b966ead6314e375303bdd178cdd9bed1a61a8de18d5cad5c9
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fir-cli (0.1.
|
5
|
-
highline (~> 1.6
|
4
|
+
fir-cli (0.1.8)
|
5
|
+
highline (~> 1.6)
|
6
6
|
lagunitas (= 0.0.1)
|
7
|
-
paint (~> 0.9
|
7
|
+
paint (~> 0.9)
|
8
8
|
pngdefry (= 0.1.1)
|
9
|
-
rest_client (~> 1.8
|
10
|
-
ruby_apk (~> 0.7
|
11
|
-
thor (~> 0.19
|
9
|
+
rest_client (~> 1.8)
|
10
|
+
ruby_apk (~> 0.7)
|
11
|
+
thor (~> 0.19)
|
12
12
|
user_config (= 0.0.4)
|
13
13
|
|
14
14
|
GEM
|
@@ -23,6 +23,7 @@ GEM
|
|
23
23
|
netrc (0.7.9)
|
24
24
|
paint (0.9.0)
|
25
25
|
pngdefry (0.1.1)
|
26
|
+
rake (10.4.0)
|
26
27
|
rest_client (1.8.2)
|
27
28
|
netrc (~> 0.7.7)
|
28
29
|
ruby_apk (0.7.1)
|
@@ -36,4 +37,6 @@ PLATFORMS
|
|
36
37
|
ruby
|
37
38
|
|
38
39
|
DEPENDENCIES
|
40
|
+
bundler (~> 1.7)
|
39
41
|
fir-cli!
|
42
|
+
rake (~> 10.0)
|
data/README.md
CHANGED
@@ -2,11 +2,21 @@ FIR.im CLI
|
|
2
2
|
---
|
3
3
|
> FIR.im CLI 可以通过指令查看、上传、编译应用,同时还集成了第三方网站 [resign.tapbeta.com](http://resign.tapbeta.com) 进行企业签名以方便 inhouse 测试。
|
4
4
|
|
5
|
+
## Changelog
|
6
|
+
### FIR-cli 0.1.8
|
7
|
+
- 支持 ruby 1.9.x
|
8
|
+
- 规范输出参数选项,支持无颜色信息输出
|
9
|
+
-`--verbose=v|vv|vvv`:设置输出级别
|
10
|
+
-`--quiet` 与 `--no-quiet`:设置是否不输出辅助信息
|
11
|
+
-`--color` 与 `--no-color`:设置输出是否携带颜色信息
|
12
|
+
- 修复 ipa 应用图标不清晰问题
|
13
|
+
- 增加切换配置文件功能:使用此功能可以在多个用户中切换使用
|
14
|
+
|
5
15
|
## 使用说明
|
6
16
|
### 从安装入手
|
7
17
|
FIR.im CLI 使用 ruby 构建,只要安装相应 ruby gem 即可:
|
8
18
|
```shell
|
9
|
-
$ gem install fir-cli
|
19
|
+
$ sudo gem install fir-cli
|
10
20
|
```
|
11
21
|
安装后,你可以在命令行执行指令
|
12
22
|
```shell
|
@@ -14,16 +24,16 @@ $ fir
|
|
14
24
|
> 欢迎使用 FIR.im 命令行工具,如需帮助请输入: fir help
|
15
25
|
Commands:
|
16
26
|
fir config # 配置全局设置
|
17
|
-
fir help [COMMAND] # Describe available commands or one specific
|
27
|
+
fir help [COMMAND] # Describe available commands or one specific command
|
18
28
|
fir info APP_FILE_PATH # 获取应用文件的信息(支持 ipa 文件和 apk 文件)
|
19
|
-
fir login
|
29
|
+
fir login # 登录
|
20
30
|
fir publish APP_FILE_PATH # 将应用文件发布至 FIR.im(支持 ipa 文件和 apk 文件)
|
21
31
|
fir resign IPA_FILE_PATH OUTPUT_PATH # 使用 resign.tapbeta.com 进行企业签名
|
22
|
-
fir upgrade
|
32
|
+
fir upgrade # 更新 fir-cli 的所有组件
|
23
33
|
```
|
24
34
|
|
25
35
|
### 发布一个应用
|
26
|
-
|
36
|
+
输入下面的指令便可轻松发布应用
|
27
37
|
```shell
|
28
38
|
$ fir publish 应用路径
|
29
39
|
```
|
@@ -33,6 +43,10 @@ $ fir publish 应用路径
|
|
33
43
|
> 正在解析 ipa 文件...
|
34
44
|
> 正在获取 im.fir.juo@FIR.im 的应用信息...
|
35
45
|
请输入用户 token:
|
46
|
+
```
|
47
|
+
输入用户 token 后,系统会自动上传
|
48
|
+
```shell
|
49
|
+
请输入用户 token:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
36
50
|
> 上传应用...
|
37
51
|
> 上传应用成功
|
38
52
|
> 正在更新 fir 的应用信息...
|
@@ -48,20 +62,28 @@ $ fir publish 应用路径
|
|
48
62
|
如果觉得每次都输入用户 token 很不方便,那么可使用登录命令
|
49
63
|
|
50
64
|
```shell
|
51
|
-
$ fir login
|
65
|
+
$ fir login
|
66
|
+
```
|
67
|
+
这时系统会提示输入用户 token
|
68
|
+
```shell
|
52
69
|
> 欢迎使用 FIR.im 命令行工具,如需帮助请输入: fir help
|
53
|
-
|
54
|
-
|
70
|
+
输入你的用户 token:
|
71
|
+
```
|
72
|
+
输入用户 token,系统会自动获取你的用户 email
|
73
|
+
```shell
|
74
|
+
输入你的用户 token:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
75
|
+
> 设置用户邮件地址为: dy@fir.im
|
76
|
+
> 当前登陆用户为:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
55
77
|
```
|
56
78
|
|
57
79
|
|
58
80
|
### 需要企业签名?
|
59
|
-
很多开发者需要一个企业签名的应用,来让更多的用户参与到测试中,这种行为并不符合企业证书的使用规范。但是我们还是集成了第三方签名网站 [resign.tapbeta.com](http://resign.tapbeta.com)
|
81
|
+
很多开发者需要一个企业签名的应用,来让更多的用户参与到测试中,这种行为并不符合企业证书的使用规范。但是我们还是集成了第三方签名网站 [resign.tapbeta.com](http://resign.tapbeta.com) 来帮助我们的用户更方便的进行测试。
|
60
82
|
|
61
83
|
```shell
|
62
84
|
$ fir resign ipa文件路径 输出文件路径
|
63
85
|
```
|
64
|
-
|
86
|
+
这条指令会输出一段风险提示;如果没有设置邮件地址,这里会让你输入邮件地址。输入邮件地址后,便开始进行企业签名了
|
65
87
|
```
|
66
88
|
> 欢迎使用 FIR.im 命令行工具,如需帮助请输入: fir help
|
67
89
|
! resign.tapbeta.com 签名服务风险提示
|
@@ -115,53 +137,61 @@ fir help
|
|
115
137
|
fir help COMMAND
|
116
138
|
```
|
117
139
|
|
118
|
-
###
|
119
|
-
>
|
140
|
+
### 切换配置文件
|
141
|
+
> 以下指令用于切换配置文件,一个用户可以拥有多个配置文件。用户所有全局设置都跟随配置文件的切换而变化
|
120
142
|
|
143
|
+
- `-d` 删除指定配置文件
|
121
144
|
```shell
|
122
|
-
fir
|
145
|
+
fir profile PROFILE [-d]
|
123
146
|
```
|
124
147
|
|
125
|
-
###
|
126
|
-
>
|
148
|
+
### 登录
|
149
|
+
> 以下指令用于登录,登录后系统会从 FIR.im 自动获取你的邮件等信息。已登录用户在[这里](http://fir.im/user/info)可以找到自己的用户 token。
|
127
150
|
|
128
|
-
- `-a`:可选,现实全部信息
|
129
|
-
- `-f`:可选,显示托管在 [FIR.im](http://fir.im) 的信息
|
130
|
-
- `-v`:可选,设置输出级别,级别分为三个:`v`、`vv`、`vvv`,默认为`vv`
|
131
|
-
- `-q`:可选,安静模式,不输出任何信息
|
132
151
|
```shell
|
133
|
-
fir
|
152
|
+
fir login
|
134
153
|
```
|
135
|
-
|
136
154
|
### 设置全局信息
|
137
155
|
> 以下指令用于全局设置。执行指令时如果不指明相应选项,会读取全局设置。
|
138
156
|
|
139
|
-
-
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
157
|
+
- `--token=TOKEN`:见`登录`
|
158
|
+
- `--resign`:见`第三方企业证书签名服务`
|
159
|
+
- `--email=EMAIL`:见`第三方企业证书签名服务`
|
160
|
+
- `--verbose=v|vv|vvv`:见`控制输出参数`
|
161
|
+
- `--quiet` 与 `--no-quiet`:见`控制输出参数`
|
162
|
+
- `--color` 与 `--no-color`:见`控制输出参数`
|
144
163
|
```shell
|
145
|
-
fir config [
|
164
|
+
fir config [options]
|
146
165
|
```
|
147
166
|
|
167
|
+
### 获取应用文件的信息
|
168
|
+
> 以下指令用于显示应用信息,支持 ipa 和 apk 文件。
|
169
|
+
|
170
|
+
- `--all` 与 `--no-all`:可选,现实全部信息
|
171
|
+
- `--fir` 与 `--no-fir`:可选,显示托管在 [FIR.im](http://fir.im) 的信息
|
172
|
+
```shell
|
173
|
+
fir info APP_FILE_PATH [-a] [-f] [-v v|vv|vvv] [-q]
|
174
|
+
```
|
175
|
+
|
176
|
+
|
177
|
+
|
148
178
|
### 第三方企业证书签名服务
|
149
179
|
> 以下指令使用 [resign.tapbeta.com](http://resign.tapbeta.com) 进行企业证书签名
|
150
180
|
|
151
181
|
- `INPUT_IPA_PATH`:待签名的 ipa 文件路径
|
152
182
|
- `OUTPUT_IPA_PATH`:签名后的输出文件路径
|
153
|
-
-
|
183
|
+
- `--email=EMAIL`:可选,设置使用签名服务的邮件地址
|
154
184
|
```shell
|
155
|
-
fir resign INTPUT_IPA_FILE OUTPUT_IPA_FILE [
|
185
|
+
fir resign INTPUT_IPA_FILE OUTPUT_IPA_FILE [--email=EMAIL]
|
156
186
|
```
|
157
187
|
|
158
188
|
### 发布应用至 [FIR.im](http://fir.im)
|
159
189
|
> 以下指令用于发布应用到 [FIR.im](http://fir.im),支持 ipa 和 apk 文件。
|
160
190
|
|
161
|
-
-
|
162
|
-
-
|
163
|
-
-
|
164
|
-
-
|
191
|
+
- `--resign` 与 `--no-resign`:可选,此开关控制是否使用第三方企业签名服务,仅支持 ipa 文件
|
192
|
+
- `--short=SHORT`:可选,指定发布应用的短地址
|
193
|
+
- `--token=USER_TOKEN`:可选,设定发布应用的帐号,未设置则使用全局设置
|
194
|
+
- `--changelog=CHANGE_LOG`:可选,设置更新日志
|
165
195
|
```shell
|
166
196
|
fir publish APP_FILE_PATH [-r] [-s SHORT] [-t USER_TOKEN] [-c CHANGE_LOG]
|
167
197
|
```
|
@@ -173,3 +203,10 @@ fir publish APP_FILE_PATH [-r] [-s SHORT] [-t USER_TOKEN] [-c CHANGE_LOG]
|
|
173
203
|
fir upgrade
|
174
204
|
```
|
175
205
|
|
206
|
+
### 通用参数
|
207
|
+
#### 控制输出参数
|
208
|
+
> 几乎全部 FIR-cli 指令都支持下面的控制输出参数
|
209
|
+
|
210
|
+
- `--verbose=v|vv|vvv`:用于控制输出级别,`v`只输出以`!`开始的内容;`vv`输出以`!`或`>`开始的内容;`vvv`输出全部辅助信息。
|
211
|
+
- `--quiet` 与 `--no-quiet`:设置是否不输出全部辅助信息
|
212
|
+
- `--color` 与 `--no-color`:设置输出信息是否包含命令行颜色信息
|
data/bin/fir
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# coding: utf-8
|
3
|
+
|
2
4
|
require 'fir-cli'
|
3
5
|
|
6
|
+
|
4
7
|
Fir::Cli.find_extends.each { |g| require g }
|
5
8
|
|
6
9
|
begin
|
7
|
-
|
10
|
+
Fir::Cli.start ARGV
|
8
11
|
rescue Exception => e
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
+
s = e.to_s
|
13
|
+
s = ": #{s}" if !s.empty?
|
14
|
+
puts "! #{Paint["错误#{s}", :red]}"
|
12
15
|
end
|
13
16
|
|
data/fir-cli.gemspec
CHANGED
@@ -1,27 +1,33 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'fir-cli/version'
|
4
5
|
|
5
6
|
Gem::Specification.new do |s|
|
6
7
|
s.name = 'fir-cli'
|
7
|
-
s.version =
|
8
|
+
s.version = Fir::Cli::VERSION
|
8
9
|
s.date = '2014-11-20'
|
9
10
|
s.summary = 'FIR.im 命令行工具'
|
10
11
|
s.description = 'FIR.im 命令行工具,支持 ios 和 android'
|
11
12
|
s.homepage = 'http://blog.fir.im/2014/fir-cli'
|
12
|
-
s.
|
13
|
+
s.authors = ['FIR.im']
|
13
14
|
s.email = 'fir-cli@fir.im'
|
14
15
|
s.license = 'GPLv3'
|
15
|
-
|
16
|
-
s.
|
16
|
+
|
17
|
+
s.files = `git ls-files | grep -Ev ".dev."`.split("\n")
|
18
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
20
|
s.require_paths << './'
|
18
21
|
|
19
22
|
s.add_dependency 'lagunitas', '0.0.1'
|
20
23
|
s.add_dependency 'user_config', '0.0.4'
|
21
24
|
s.add_dependency 'pngdefry', '0.1.1'
|
22
|
-
s.add_dependency 'rest_client', '~> 1.8
|
23
|
-
s.add_dependency 'paint', '~> 0.9
|
24
|
-
s.add_dependency 'thor', '~> 0.19
|
25
|
-
s.add_dependency 'ruby_apk', '~> 0.7
|
26
|
-
s.add_dependency 'highline', '~> 1.6
|
25
|
+
s.add_dependency 'rest_client', '~> 1.8'
|
26
|
+
s.add_dependency 'paint', '~> 0.9'
|
27
|
+
s.add_dependency 'thor', '~> 0.19'
|
28
|
+
s.add_dependency 'ruby_apk', '~> 0.7'
|
29
|
+
s.add_dependency 'highline', '~> 1.6'
|
30
|
+
|
31
|
+
s.add_development_dependency "bundler", "~> 1.7"
|
32
|
+
s.add_development_dependency "rake", "~> 10.0"
|
27
33
|
end
|
data/fir-cli.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'uri'
|
2
|
-
require 'thor'
|
3
2
|
require 'json'
|
4
3
|
require 'pathname'
|
5
4
|
require 'tempfile'
|
@@ -15,9 +14,9 @@ require 'ruby_apk'
|
|
15
14
|
require 'highline/import'
|
16
15
|
|
17
16
|
module Fir
|
18
|
-
class Cli < Thor
|
19
|
-
end
|
17
|
+
class Cli < Thor; end
|
20
18
|
end
|
21
19
|
|
22
|
-
Dir[File.dirname(__FILE__) + '/lib/*.rb'].each {|f| require f }
|
23
|
-
Dir[File.dirname(__FILE__) + '/lib
|
20
|
+
Dir[File.dirname(__FILE__) + '/lib/fir-cli/*.rb'].each { |f| require f }
|
21
|
+
Dir[File.dirname(__FILE__) + '/lib/*.rb'].each { |f| require f }
|
22
|
+
Dir[File.dirname(__FILE__) + '/lib/fir-cli-commands/*.rb'].each { |f| require f }
|
@@ -1,15 +1,15 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
+
class Cli
|
3
4
|
desc 'config', '配置全局设置'
|
4
5
|
option :token, :aliases => '-t', :desc => '用户 token'
|
5
6
|
option :email, :aliases => '-e', :desc => '邮件地址'
|
6
7
|
option :resign, :aliases => '-r', :desc => '是否以企业签名发布 ios 应用', :type => :boolean
|
7
|
-
|
8
|
-
option :quiet, :aliases => '-q', :desc => '安静模式', :type => :boolean
|
8
|
+
output_options
|
9
9
|
def config
|
10
10
|
if options.length > 0
|
11
11
|
options.each do |option|
|
12
|
-
|
12
|
+
_puts "> #{Paint[option[0].to_s.rjust(10), :blue]} : #{@config[option[0].to_s]} => #{option[1]}"
|
13
13
|
@config[option[0].to_s] = option[1]
|
14
14
|
end
|
15
15
|
if @config['token'] && !_user(@config['token'])
|
@@ -18,8 +18,9 @@ module Fir
|
|
18
18
|
end
|
19
19
|
@config.save
|
20
20
|
end
|
21
|
-
|
22
|
-
@config.
|
21
|
+
_puts '> 设置完成,您现在使用的设置是'
|
22
|
+
@config.save
|
23
|
+
@config.each { |conf| _puts "> #{Paint[conf[0].to_s.rjust(10), :blue]} => #{conf[1]}"}
|
23
24
|
end
|
24
25
|
end
|
25
26
|
end
|
@@ -1,16 +1,16 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
+
class Cli
|
3
4
|
desc 'info APP_FILE_PATH', '获取应用文件的信息(支持 ipa 文件和 apk 文件)'
|
4
5
|
option :all, :aliases => '-a', :desc => '显示全部应用信息', :type => :boolean
|
5
6
|
option :fir, :aliases => '-f', :desc => '显示托管在 fir.im 的应用信息', :type => :boolean
|
6
|
-
|
7
|
-
option :quiet, :aliases => '-q', :desc => '安静模式,不输出任何选项'
|
7
|
+
output_options
|
8
8
|
def info(path)
|
9
9
|
app = _info path, options[:all]
|
10
|
-
app.each { |i|
|
10
|
+
app.each { |i| _puts "#{Paint[i[0].to_s.rjust(18), :blue]} #{i[1]}" }
|
11
11
|
if options[:fir]
|
12
12
|
fir_app = _fir_info app[:identifier], app[:type]
|
13
|
-
fir_app.each { |i|
|
13
|
+
fir_app.each { |i| _puts "#{Paint[i[0].to_s.rjust(18), :blue]} #{i[1]}" }
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
-
|
4
|
-
|
5
|
-
option :quite, :aliases => '-q', :desc => '安静模式,不输出任何选项'
|
3
|
+
class Cli
|
4
|
+
desc 'login', '登录'
|
5
|
+
output_options
|
6
6
|
def login
|
7
7
|
token = _prompt_secret('输入你的用户 token:')
|
8
8
|
if token.empty?
|
@@ -14,17 +14,17 @@ module Fir
|
|
14
14
|
_puts_invalid_token
|
15
15
|
exit 1
|
16
16
|
end
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
if _opt_token && _opt_token != token
|
18
|
+
_puts "> 已登陆用户: #{_opt_token}"
|
19
|
+
_puts "> 替换为用户: #{token}"
|
20
|
+
end
|
21
21
|
if user[:email]
|
22
|
-
_puts "> 设置用户邮件地址为: #{
|
22
|
+
_puts "> 设置用户邮件地址为: #{user[:email]}"
|
23
23
|
@config['email'] = user[:email]
|
24
24
|
end
|
25
25
|
@config['token'] = token
|
26
26
|
@config.save
|
27
|
-
_puts "> 当前登陆用户为:#{
|
27
|
+
_puts "> 当前登陆用户为:#{token}"
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
module Fir
|
3
|
+
class Cli
|
4
|
+
desc 'profile', '切换配置文件'
|
5
|
+
option :delete, :aliases => '-d', :desc => '删除指定的配置文件', :type => :boolean
|
6
|
+
output_options
|
7
|
+
def profile(prof)
|
8
|
+
if prof == 'global'
|
9
|
+
_puts '! 不能使用 global 作为配置文件名'
|
10
|
+
exit 1
|
11
|
+
end
|
12
|
+
prof = "#{prof}.yaml"
|
13
|
+
if options[:delete]
|
14
|
+
_puts "> 正在删除配置文件:#{prof}"
|
15
|
+
@uconfig.delete prof
|
16
|
+
else
|
17
|
+
if _profile == prof
|
18
|
+
_puts "! #{Paint["你正在使用该配置:#{prof}", :red]}"
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
_puts "> 正在使用配置文件:#{_profile}"
|
22
|
+
_puts "> 即将替换为:#{prof}"
|
23
|
+
@global_config['profile'] = prof
|
24
|
+
@global_config.save
|
25
|
+
_load_config
|
26
|
+
_puts "> 已替换为:#{prof}"
|
27
|
+
config
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,15 +1,16 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
+
class Cli
|
3
4
|
desc 'publish APP_FILE_PATH', '将应用文件发布至 FIR.im(支持 ipa 文件和 apk 文件)'
|
4
5
|
option :resign, :aliases => '-r', :desc => '进行企业签名', :type => :boolean
|
6
|
+
option :email, :aliases => '-e', :desc => '企业签名所需的邮件地址'
|
5
7
|
option :short, :aliases => '-s', :desc => '自定义短地址'
|
6
8
|
option :token, :aliases => '-t', :desc => '用户 token'
|
7
9
|
option :changelog, :aliases => '-c', :desc => '修改纪录,默认为空字符串', :default => ''
|
8
|
-
|
9
|
-
option :quiet, :aliases => '-q', :desc => '安静模式,不输出任何选项'
|
10
|
+
output_options
|
10
11
|
def publish(path)
|
11
12
|
if _opt_resign && _is_ipa(path)
|
12
|
-
tfile = Tempfile.new ["resign-#{
|
13
|
+
tfile = Tempfile.new ["resign-#{SecureRandom.hex}", '.ipa']
|
13
14
|
resign path, tfile.path
|
14
15
|
path = tfile.path
|
15
16
|
end
|
@@ -17,7 +18,6 @@ module Fir
|
|
17
18
|
fir_app = _fir_info app[:identifier], app[:type]
|
18
19
|
|
19
20
|
id = fir_app[:id]
|
20
|
-
short = fir_app[:short]
|
21
21
|
bundle_app = fir_app[:bundle][:pkg]
|
22
22
|
bundle_icon = fir_app[:bundle][:icon]
|
23
23
|
|
@@ -49,18 +49,22 @@ module Fir
|
|
49
49
|
_fir_put fir_app[:id],
|
50
50
|
:name => app[:display_name] || app[:name],
|
51
51
|
:short => options[:short] || fir_app[:short],
|
52
|
-
:
|
53
|
-
:
|
52
|
+
# :desc => options[:describe] || fir_app[:desc]
|
53
|
+
# :show => options[:public] || fir_app[:show]
|
54
|
+
:source => 'fir-cli'
|
54
55
|
|
56
|
+
_fir_vput_complete upload_res[:versionOid],
|
57
|
+
:version => app[:version],
|
58
|
+
:versionShort => app[:short_version],
|
59
|
+
:devices => app[:devices],
|
60
|
+
:release_type => app[:release_type]
|
61
|
+
|
55
62
|
_fir_vput upload_res[:versionOid],
|
56
|
-
:version => app[:version],
|
57
|
-
:versionShort => app[:short_version],
|
58
|
-
:devices => app[:devices],
|
59
|
-
:release_type => app[:release_type],
|
60
63
|
:changelog => options[:changelog]
|
61
64
|
|
62
|
-
|
63
|
-
|
65
|
+
# Get updated app info
|
66
|
+
fir_app = _fir_info app[:identifier]
|
67
|
+
_puts "> #{_base_path}/#{fir_app[:short]}"
|
64
68
|
end
|
65
69
|
end
|
66
70
|
end
|
@@ -1,23 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
+
class Cli
|
3
4
|
desc 'resign IPA_FILE_PATH OUTPUT_PATH', '使用 resign.tapbeta.com 进行企业签名'
|
4
5
|
option :email, :aliases => '-e', :desc => '邮件地址'
|
5
|
-
|
6
|
-
option :quiet, :aliases => '-q', :desc => '安静模式,不输出任何选项'
|
6
|
+
output_options
|
7
7
|
def resign(ipath, opath)
|
8
|
-
_puts "! #{
|
8
|
+
_puts "! #{Paint['resign.tapbeta.com 签名服务风险提示', :red]}"
|
9
9
|
_puts '! tapbeta 无法保证签名证书的长期有效性,苹果随时可'
|
10
10
|
_puts '! 能封杀他们的企业账号,所有由这个企业账号签发的证'
|
11
11
|
_puts '! 书都会失效。你如果使用该网站提供的证书进行应用签'
|
12
|
-
_puts "! 发,请注意:#{
|
13
|
-
_puts "! #{
|
14
|
-
_puts "! #{
|
12
|
+
_puts "! 发,请注意:#{Paint['当证书失效后,所有通过已失效证书签名', :red ]}"
|
13
|
+
_puts "! #{Paint['的应用都会无法正常运行;同时托管在 fir.im 的应用', :red ]}"
|
14
|
+
_puts "! #{Paint['将无法正常安装。', :red ]}"
|
15
15
|
if _opt_email == nil
|
16
16
|
@email = _prompt '请输入你的邮件地址:'
|
17
17
|
if !@email || @email.length == 0
|
18
|
-
_puts "! #{
|
19
|
-
_puts "! #{
|
20
|
-
_puts "! #{
|
18
|
+
_puts "! #{Paint['你需要提供邮件地址才能使用 resign.tapbeta.com 的', :red]}"
|
19
|
+
_puts "! #{Paint['签名服务, 请使用', :red]} fir config --email=EMAIL #{Paint['进行设', :red]}"
|
20
|
+
_puts "! #{Paint['置', :red]}"
|
21
21
|
exit 1
|
22
22
|
elsif !_is_email @email
|
23
23
|
_puts_invalid_email
|
@@ -25,7 +25,7 @@ module Fir
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
if !_is_ipa ipath
|
28
|
-
_puts "! #{
|
28
|
+
_puts "! #{Paint['只能给以 ipa 为扩展名的文件签名', :red]}"
|
29
29
|
exit 1
|
30
30
|
end
|
31
31
|
_puts '> 正在申请上传令牌...'
|
@@ -46,7 +46,7 @@ module Fir
|
|
46
46
|
|
47
47
|
# Upyun's notify is fucking, handle it specific
|
48
48
|
# if tapbeta[:tb_upload_url].include? 'upyun'
|
49
|
-
# RestClient.get "#{
|
49
|
+
# RestClient.get "#{form[:'notify-url']}?#{URI.encode_www_form JSON.parse res.body}"
|
50
50
|
# end
|
51
51
|
|
52
52
|
|
@@ -54,7 +54,7 @@ module Fir
|
|
54
54
|
nped = true
|
55
55
|
info = {}
|
56
56
|
loop do
|
57
|
-
res = RestClient.get "http://api.resign.tapbeta.com/public/#{
|
57
|
+
res = RestClient.get "http://api.resign.tapbeta.com/public/#{tapbeta[:tb_upload_key]}",
|
58
58
|
:params => { :__mr => 'eyJ1cmwiOiIkKHVybCkiLCAicmVzaWduU3RhdHVzIjogIiQocmVzaWduU3RhdHVzKSIsICJzdGF0dXMiOiAiJChzdGF0dXMpIn0=' }
|
59
59
|
info = JSON.parse res.body, :symbolize_names => true
|
60
60
|
if nped && info[:resignStatus] == 'doing'
|
@@ -62,15 +62,18 @@ module Fir
|
|
62
62
|
nped = false
|
63
63
|
end
|
64
64
|
if info[:status] == 'error'
|
65
|
-
_puts "! #{
|
65
|
+
_puts "! #{Paint['签名失败', :red]}"
|
66
|
+
exit 1
|
67
|
+
elsif info[:status] == 'timeout'
|
68
|
+
_puts "! #{Paint['签名超时', :red]}"
|
66
69
|
exit 1
|
67
70
|
end
|
68
71
|
break if info[:url] != ''
|
69
72
|
sleep 5
|
70
73
|
end
|
71
74
|
opath = Pathname.new(Dir.pwd).join(opath).cleanpath
|
72
|
-
_puts "> 正在下载到 #{
|
73
|
-
`curl #{
|
75
|
+
_puts "> 正在下载到 #{opath}..."
|
76
|
+
`curl #{info[:url]} -o #{opath} -s`
|
74
77
|
end
|
75
78
|
end
|
76
79
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
-
desc 'upgrade
|
4
|
-
|
5
|
-
option :quiet, :aliases => '-q', :desc => '安静模式,不输出任何选项'
|
3
|
+
class Cli
|
4
|
+
desc 'upgrade', '更新 fir-cli 的所有组件'
|
5
|
+
output_options
|
6
6
|
def upgrade
|
7
7
|
_puts '> gem update fir-cli'
|
8
8
|
`gem update fir-cli`
|
9
9
|
_extends.each do |gem|
|
10
|
-
_puts "> gem update #{
|
11
|
-
`gem update #{
|
10
|
+
_puts "> gem update #{gem}"
|
11
|
+
`gem update #{gem}`
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/fir-cli.core.ext.rb
CHANGED
@@ -1,29 +1,35 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
+
class Cli
|
3
4
|
private
|
4
5
|
def _fir_info(identifier, type = 'ios')
|
5
|
-
_puts "> 正在获取 #{
|
6
|
+
_puts "> 正在获取 #{identifier}@FIR.im 的应用信息..."
|
6
7
|
_chk_login
|
7
8
|
body = { :token => @token, :type => type }
|
8
|
-
res = RestClient.get "
|
9
|
+
res = RestClient.get "#{_base_path}/api/v2/app/info/#{identifier}?#{URI.encode_www_form body}"
|
9
10
|
JSON.parse res.body, :symbolize_names => true
|
10
11
|
end
|
11
12
|
def _fir_put(id, body)
|
12
13
|
_chk_login
|
13
14
|
body[:token] = @token
|
14
15
|
_puts '> 正在更新 fir 的应用信息...'
|
15
|
-
RestClient.put "
|
16
|
+
RestClient.put "#{_base_path}/api/v2/app/#{id}?#{URI.encode_www_form body}", body
|
16
17
|
_puts '> 更新成功'
|
17
18
|
end
|
18
|
-
def
|
19
|
+
def _fir_vput_complete(id, body)
|
19
20
|
_chk_login
|
20
21
|
body[:token] = @token
|
21
22
|
_puts '> 正在更新 fir 的应用版本信息...'
|
22
|
-
RestClient.put "
|
23
|
+
RestClient.put "#{_base_path}/api/v2/appVersion/#{id}/complete?#{URI.encode_www_form body}", body
|
23
24
|
_puts '> 更新成功'
|
24
25
|
end
|
26
|
+
def _fir_vput(id, body)
|
27
|
+
_chk_login
|
28
|
+
body[:token] = @token
|
29
|
+
RestClient.put "#{_base_path}/api/v2/appVersion/#{id}?#{URI.encode_www_form body}", body
|
30
|
+
end
|
25
31
|
def _user(token)
|
26
|
-
RestClient.get "
|
32
|
+
RestClient.get "#{_base_path}/api/v2/user/me?token=#{token}" do |res|
|
27
33
|
case res.code
|
28
34
|
when 200
|
29
35
|
JSON.parse res.body, :symbolize_names => true
|
data/lib/fir-cli.utils.ext.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Fir
|
2
|
-
class Cli
|
3
|
+
class Cli
|
3
4
|
def initialize(*args)
|
4
5
|
super
|
6
|
+
@tmpfiles = []
|
5
7
|
_init_config
|
8
|
+
_load_config
|
6
9
|
_puts_welcome
|
7
10
|
end
|
8
11
|
def self.find_extends
|
@@ -11,34 +14,56 @@ module Fir
|
|
11
14
|
.map { |gem| /^[^\s]+/.match(gem)[0] }
|
12
15
|
.select { |gem| true if gem.start_with? 'fir-cli-' }
|
13
16
|
end
|
14
|
-
|
17
|
+
def self.output_options
|
18
|
+
option :verbose,
|
19
|
+
:desc => '设置输出辅助信息的详细程度',
|
20
|
+
:type => :string,
|
21
|
+
:enum => ['v', 'vv', 'vvv']
|
22
|
+
option :quiet,
|
23
|
+
:aliases => '-q',
|
24
|
+
:desc => '安静模式,不输出任何辅助信息',
|
25
|
+
:type => 'boolean'
|
26
|
+
option :color,
|
27
|
+
:desc => '设置输出带有颜色的信息',
|
28
|
+
:type => 'boolean'
|
29
|
+
end
|
30
|
+
private
|
15
31
|
def _extends
|
16
32
|
@extends ||= Cli.find_extends
|
17
33
|
end
|
18
34
|
def _init_config
|
19
35
|
@uconfig = UserConfig.new '.fir'
|
20
|
-
@
|
21
|
-
@tmpfiles = []
|
22
|
-
end
|
23
|
-
def _path(path)
|
24
|
-
path = Pathname.new(Dir.pwd).join(path).cleanpath
|
36
|
+
@global_config = @uconfig['global.yaml']
|
25
37
|
end
|
26
|
-
def
|
27
|
-
@
|
38
|
+
def _load_config
|
39
|
+
@config = @uconfig[_profile]
|
28
40
|
end
|
29
|
-
def
|
30
|
-
@
|
41
|
+
def _profile
|
42
|
+
@global_config['profile'] || 'default.yaml'
|
31
43
|
end
|
32
|
-
def
|
33
|
-
|
34
|
-
end
|
35
|
-
def _opt_resign
|
36
|
-
return options[:resign] if defined? options[:resign]
|
37
|
-
@resign ||= options[:resign] || @config['resign']
|
44
|
+
def _path(path)
|
45
|
+
path = Pathname.new(Dir.pwd).join(path).cleanpath
|
38
46
|
end
|
39
|
-
|
40
|
-
|
41
|
-
|
47
|
+
no_commands do
|
48
|
+
%w(token email verbose).each do |_m|
|
49
|
+
define_method "_opt_#{_m}" do
|
50
|
+
unless instance_variable_get("@#{_m}")
|
51
|
+
instance_variable_set("@#{_m}", options[_m.to_sym] || @config[_m] )
|
52
|
+
end
|
53
|
+
instance_variable_get("@#{_m}")
|
54
|
+
end
|
55
|
+
private "_opt_#{_m}".to_sym
|
56
|
+
end
|
57
|
+
%w(resign quiet color trim).each do |_m|
|
58
|
+
define_method "_opt_#{_m}" do
|
59
|
+
return false if options[_m.to_sym] == false
|
60
|
+
unless instance_variable_get("@#{_m}")
|
61
|
+
instance_variable_set("@#{_m}", options[_m.to_sym] || @config[_m] )
|
62
|
+
end
|
63
|
+
instance_variable_get("@#{_m}")
|
64
|
+
end
|
65
|
+
private "_opt_#{_m}".to_sym
|
66
|
+
end
|
42
67
|
end
|
43
68
|
def _is_ipa(path)
|
44
69
|
path.end_with? '.ipa'
|
@@ -66,33 +91,38 @@ module Fir
|
|
66
91
|
end
|
67
92
|
end
|
68
93
|
def _prompt_secret(prompt)
|
69
|
-
ask(prompt) {|q| q.echo = false}
|
94
|
+
ask(prompt) { |q| q.echo = false }
|
70
95
|
end
|
71
96
|
def _prompt(prompt)
|
72
|
-
ask(prompt) {|q| q}
|
97
|
+
ask(prompt) { |q| q }
|
73
98
|
end
|
74
99
|
def _puts(text)
|
100
|
+
return puts _format text if !/^[->!] /.match text
|
75
101
|
return if _opt_quiet
|
76
102
|
case _opt_verbose || 'vv' # If nothing about log is set, use the default option - vv
|
77
103
|
when 'v'
|
78
|
-
puts text if text.start_with?('!')
|
104
|
+
puts _format text if text.start_with?('!')
|
79
105
|
when 'vv'
|
80
|
-
puts text if text.start_with?('!') || text.start_with?('>')
|
106
|
+
puts _format text if text.start_with?('!') || text.start_with?('>')
|
81
107
|
when 'vvv'
|
82
|
-
puts text if text.start_with?('!') || text.start_with?('>') || text.start_with?('-')
|
108
|
+
puts _format text if text.start_with?('!') || text.start_with?('>') || text.start_with?('-')
|
83
109
|
end
|
84
110
|
end
|
111
|
+
def _format(text)
|
112
|
+
return text.gsub /\e\[\d+(?:;\d+)*m/, '' if _opt_color == false
|
113
|
+
text
|
114
|
+
end
|
85
115
|
def _puts_welcome
|
86
|
-
_puts "> #{
|
116
|
+
_puts "> #{Paint['欢迎使用 FIR.im 命令行工具,如需帮助请输入:', :green]} fir help"
|
87
117
|
end
|
88
118
|
def _puts_require_token
|
89
|
-
_puts "! #{
|
119
|
+
_puts "! #{Paint['用户 token 不能为空', :red]}"
|
90
120
|
end
|
91
121
|
def _puts_invalid_token
|
92
|
-
_puts "! #{
|
122
|
+
_puts "! #{Paint['输入的用户 token 不合法', :red]}"
|
93
123
|
end
|
94
124
|
def _puts_invalid_email
|
95
|
-
_puts "! #{
|
125
|
+
_puts "! #{Paint['输入的邮件地址不合法', :red]}"
|
96
126
|
end
|
97
127
|
def _info(path, more = false)
|
98
128
|
if _is_ipa path
|
@@ -100,7 +130,7 @@ module Fir
|
|
100
130
|
elsif _is_apk path
|
101
131
|
_apk_info path, more
|
102
132
|
else
|
103
|
-
_puts "! #{
|
133
|
+
_puts "! #{Paint['只能支持后缀为 ipa 和 apk 的文件', :red]}"
|
104
134
|
end
|
105
135
|
end
|
106
136
|
def _apk_info(path, more = false)
|
@@ -115,7 +145,7 @@ module Fir
|
|
115
145
|
}
|
116
146
|
if more
|
117
147
|
info[:icons] = apk.icon.map do |name, data|
|
118
|
-
tfile = Tempfile.new ["icon-#{
|
148
|
+
tfile = Tempfile.new ["icon-#{SecureRandom.hex}", '.png']
|
119
149
|
tfile.write data
|
120
150
|
@tmpfiles.push tfile
|
121
151
|
{
|
@@ -144,8 +174,8 @@ module Fir
|
|
144
174
|
}
|
145
175
|
if more
|
146
176
|
if app.icons
|
147
|
-
info[:icons] = app.icons.map do |icon|
|
148
|
-
tfile = Tempfile.new ["icon-#{
|
177
|
+
info[:icons] = app.icons.reverse.map do |icon|
|
178
|
+
tfile = Tempfile.new ["icon-#{SecureRandom.hex}", '.png']
|
149
179
|
@tmpfiles.push tfile
|
150
180
|
FileUtils.cp icon[:path], tfile.path
|
151
181
|
{
|
@@ -161,5 +191,16 @@ module Fir
|
|
161
191
|
ipa.cleanup
|
162
192
|
info
|
163
193
|
end
|
194
|
+
def _base_path
|
195
|
+
@base_path ||= begin
|
196
|
+
path = @config['base_path'] || 'http://fir.im'
|
197
|
+
path = path.strip
|
198
|
+
if path.end_with? '/'
|
199
|
+
path.chop
|
200
|
+
else
|
201
|
+
path
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
164
205
|
end
|
165
206
|
end
|
data/lib/lagunitas.ext.rb
CHANGED
@@ -22,7 +22,7 @@ module Lagunitas
|
|
22
22
|
end
|
23
23
|
def distribution_name
|
24
24
|
# mobileprovision['DeveloperCertificates'] if mobileprovision
|
25
|
-
"#{
|
25
|
+
"#{mobileprovision['Name']}: #{mobileprovision['TeamName']}" if mobileprovision
|
26
26
|
end
|
27
27
|
def metadata
|
28
28
|
return if !metadata?
|
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: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FIR.im
|
@@ -58,70 +58,98 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.8
|
61
|
+
version: '1.8'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.8
|
68
|
+
version: '1.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: paint
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.9
|
75
|
+
version: '0.9'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.9
|
82
|
+
version: '0.9'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: thor
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.19
|
89
|
+
version: '0.19'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.19
|
96
|
+
version: '0.19'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: ruby_apk
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.7
|
103
|
+
version: '0.7'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.7
|
110
|
+
version: '0.7'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: highline
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.6
|
117
|
+
version: '1.6'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.6
|
124
|
+
version: '1.6'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: bundler
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ~>
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.7'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.7'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ~>
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '10.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '10.0'
|
125
153
|
description: FIR.im 命令行工具,支持 ios 和 android
|
126
154
|
email: fir-cli@fir.im
|
127
155
|
executables:
|
@@ -140,14 +168,17 @@ files:
|
|
140
168
|
- lib/fir-cli-commands/config.rb
|
141
169
|
- lib/fir-cli-commands/info.rb
|
142
170
|
- lib/fir-cli-commands/login.rb
|
171
|
+
- lib/fir-cli-commands/profile.rb
|
143
172
|
- lib/fir-cli-commands/publish.rb
|
144
173
|
- lib/fir-cli-commands/resign.rb
|
145
|
-
- lib/fir-cli-commands/update.rb
|
146
174
|
- lib/fir-cli-commands/upgrade.rb
|
175
|
+
- lib/fir-cli-commands/version.rb
|
147
176
|
- lib/fir-cli.core.ext.rb
|
148
177
|
- lib/fir-cli.utils.ext.rb
|
178
|
+
- lib/fir-cli/version.rb
|
149
179
|
- lib/lagunitas.ext.rb
|
150
180
|
- lib/lagunitas.patch.rb
|
181
|
+
- lib/user_config.patch.rb
|
151
182
|
homepage: http://blog.fir.im/2014/fir-cli
|
152
183
|
licenses:
|
153
184
|
- GPLv3
|
@@ -169,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
200
|
version: '0'
|
170
201
|
requirements: []
|
171
202
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.4.4
|
173
204
|
signing_key:
|
174
205
|
specification_version: 4
|
175
206
|
summary: FIR.im 命令行工具
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# module Fir
|
2
|
-
# class Cli < Thor
|
3
|
-
# desc 'update APP_FILE_PATH|BUNDLE_ID', '更新 FIR.im 的应用信息'
|
4
|
-
# option :short, :aliases => '-s', :desc => '自定义短地址'
|
5
|
-
# option :token, :aliases => '-t', :desc => '用户 token'
|
6
|
-
# option :verbose, :aliases => '-v', :desc => '设置输出级别 v, vv, vvv'
|
7
|
-
# option :quiet, :aliases => '-q', :desc => '安静模式,不输出任何选项'
|
8
|
-
# def update(path)
|
9
|
-
# identifier = path
|
10
|
-
# identifier = _info(path)[:identifier] if File.exist? _path path
|
11
|
-
# fir_app = _fir_info identifier
|
12
|
-
# opt_short = options[:short]
|
13
|
-
# post = {}
|
14
|
-
# post[:short] = opt_short if opt_short
|
15
|
-
|
16
|
-
# post.each { |i| post.delete i[0] if i[1] == fir_app[i[0]] }
|
17
|
-
|
18
|
-
# if post.length == 0 then _puts '> 没有什么可以更新的'; return end
|
19
|
-
# _fir_put fir_app[:id], post
|
20
|
-
|
21
|
-
# fir_app = _fir_info identifier
|
22
|
-
# if opt_short && opt_short != fir_app[:short]
|
23
|
-
# _puts "> 短地址 #{ opt_short } 被占用,FIR.im 自动更新短地址为 #{ fir_app[:short] }"
|
24
|
-
# end
|
25
|
-
# _puts "> http://fir.im/#{ fir_app[:short] }"
|
26
|
-
# end
|
27
|
-
# end
|
28
|
-
# end
|