fir-cli 1.6.3 → 1.6.4.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: a8bdb8f5084ab08829ed73aac4abf3a18e348dc5
4
- data.tar.gz: 2fd70b3acae3780d3d03c45ac88f00afff56903d
3
+ metadata.gz: f266a2ae75696a7e7f5dfe01ca87f63b138491d6
4
+ data.tar.gz: 562698c806b22265e4a2cbca22477c4189c3e8d6
5
5
  SHA512:
6
- metadata.gz: 7725237f63c0f72f58be18e892e6382bb9186a728b1b94165c49f5318005ec6f9984825771faab056b3488323269e267390c470fcb6515bb8e637e574b713354
7
- data.tar.gz: 567bf9edc93a706046bc8a8d2d253251ec4cb28ca24ef0625747455aaf04f8ef025cca9a83cc74dd4632b82d55a54e4bd240d3e21c25a3612d2c47c81f42e494
6
+ metadata.gz: 334840d09c38a1fd9cf71986d21941ed709e7a22e0ad026a507e0b2be16f674ca1afcb3ca0183cb500d6c9a8a5acae430a1bf761ec25b040c07bd1f77fd9691f
7
+ data.tar.gz: 4e0b386315799ee1264b8c3dc20183793cad65b778b5b2ae66e20a276b6fd2f165862dd3b4201a0a4bd09bee6ecd8f0e7d667de6acf888494a9d1369f15fb7e9
data/.flow-plugin.yml ADDED
@@ -0,0 +1,14 @@
1
+ name: fir-cli
2
+ properties:
3
+ - name: PLUGIN_FIR_TOKEN
4
+ type: string
5
+ required: true
6
+
7
+ - name: PLUGIN_FIR_APP_PATH
8
+ type: string
9
+ required: false
10
+
11
+ run: |
12
+ gem build fir-cli.gemspec
13
+ gem install *.gem
14
+ fir publish ${PLUGIN_FIR_APP_PATH} --token=$PLUGIN_FIR_TOKEN
data/.gitignore CHANGED
@@ -20,5 +20,7 @@ Gemfile.lock
20
20
  /test/cases/*.png
21
21
  /build_apk_example_*
22
22
  /build_ipa_example_*
23
+ .byebug*
23
24
 
24
25
  .idea/
26
+ lib/.byebug_history
data/Dockerfile ADDED
@@ -0,0 +1,12 @@
1
+ FROM ruby:2.4.2
2
+
3
+ ENV WORKDIR=/fir-cli
4
+ ENV HOME=/fir-cli
5
+
6
+ RUN gem install fir-cli
7
+
8
+ RUN mkdir -p $WORKDIR
9
+
10
+ WORKDIR $WORKDIR
11
+
12
+ CMD ["fir"]
data/Gemfile CHANGED
@@ -2,10 +2,10 @@
2
2
  if ENV['USE_OFFICIAL_GEM_SOURCE']
3
3
  source 'https://rubygems.org'
4
4
  else
5
- source 'https://ruby.taobao.org'
5
+ source 'http://gems.ruby-china.org'
6
6
  end
7
7
 
8
8
  # Specify your gem's dependencies in fir.gemspec
9
9
  gemspec
10
10
 
11
- gem 'codeclimate-test-reporter', group: :test, require: nil
11
+ gem 'codeclimate-test-reporter', group: :test, require: nil
data/README.md CHANGED
@@ -8,9 +8,12 @@
8
8
  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/FIRHQ/fir-cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
9
9
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/FIRHQ/fir-cli/master/LICENSE.txt)
10
10
 
11
- fir.im-cli 可以通过指令查看, 上传, 编译 iOS/Android 应用.
11
+ fir.im-cli 可以通过指令查看, 上传, iOS/Android 应用.
12
12
 
13
13
  ![fir-cli](http://7rf35s.com1.z0.glb.clouddn.com/fir-cli-new.gif)
14
+ ## 重要提示
15
+ - 由于部分地区上传时遇到的证书问题, 新版本默认忽略证书校验. 如需打开, 请在命令前加入`UPLOAD_VERIFY_SSL=1`
16
+ - 介于在ios 等编译越来越复杂化, fir-cli 自带的编译功能较为简单, 不能很好的满足用户需求, 推荐用户使用 fastlane (fastlane gym)进行打包,生成好 ipa 文件后,再使用 fir publish 上传生成的ipa 包
14
17
 
15
18
  ## 文档
16
19
 
@@ -19,17 +22,22 @@ fir.im-cli 可以通过指令查看, 上传, 编译 iOS/Android 应用.
19
22
  - [fir info 查看 ipa/apk 信息](https://github.com/FIRHQ/fir-cli/blob/master/doc/info.md)
20
23
  - [fir login & fir me 登录相关](https://github.com/FIRHQ/fir-cli/blob/master/doc/login.md)
21
24
  - [fir publish 发布应用到 fir.im](https://github.com/FIRHQ/fir-cli/blob/master/doc/publish.md)
22
- - [fir build_ipa 编译打包 ipa 文件](https://github.com/FIRHQ/fir-cli/blob/master/doc/build_ipa.md)
23
- - [fir build_apk 编译打包 apk 文件](https://github.com/FIRHQ/fir-cli/blob/master/doc/build_apk.md)
24
- - [fir mapping 上传符号表至 BugHD.com](https://github.com/FIRHQ/fir-cli/blob/master/doc/mapping.md)
25
25
  - [fir upgrade 升级相关](https://github.com/FIRHQ/fir-cli/blob/master/doc/upgrade.md)
26
26
 
27
- ## 提交反馈
27
+ ## Docker 使用 fir-cli
28
+ ```
29
+ # 方便之处是: 不需要安装 Ruby 环境只需要安装Docker环境就行把镜像 flowci/fir-cli 拉下来就能跑
30
+ # 不方便之处是: 不能使用 xcode 或者 gradle 编译代码,只能 publish 编译好的文件
31
+
32
+ curl https://raw.githubusercontent.com/FIRHQ/fir-cli/master/fir.sh -o /usr/local/bin/fir
33
+ chmod +x /usr/local/bin/fir
28
34
 
29
- 直接使用 Github 的 [Issue](https://github.com/FIRHQ/fir-cli/issues) 即可.
35
+ fir login token
36
+ fir help
37
+ ```
38
+ ## 提交反馈
30
39
 
31
- ## 捐赠支持
40
+ - 联系微信 `atpking`
32
41
 
33
- 如果你觉得 fir-cli 对你有所帮助, 欢迎微信打赏支持作者:smile:
42
+ - 使用 Github 的 [Issue](https://github.com/FIRHQ/fir-cli/issues)
34
43
 
35
- ![](http://7rf35s.com1.z0.glb.clouddn.com/coffee.png)
data/doc/publish.md CHANGED
@@ -11,8 +11,6 @@ Options:
11
11
  -s, [--short=SHORT] # Set custom short link
12
12
  -c, [--changelog=CHANGELOG] # Set changelog
13
13
  -Q, [--qrcode], [--no-qrcode] # Generate qrcode
14
- -m, [--mappingfile=MAPPINGFILE] # App mapping file
15
- -P, [--proj=PROJ] # Project id in BugHD.com if upload app mapping file
16
14
  [--open], [--no-open] # true/false if open for everyone
17
15
  [--password=PASSWORD] # Set password for app
18
16
  -T, [--token=TOKEN] # User's API Token at fir.im
data/fir-cli.gemspec CHANGED
@@ -7,8 +7,8 @@ require 'fir/version'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'fir-cli'
9
9
  spec.version = FIR::VERSION
10
- spec.authors = ['NaixSpirit']
11
- spec.email = ['neverlandxy.naix@gmail.com']
10
+ spec.authors = ['NaixSpirit', 'atpking']
11
+ spec.email = ['atpking@gmail.com']
12
12
  spec.date = Time.now.strftime('%Y-%m-%d')
13
13
  spec.summary = 'fir.im command tool'
14
14
  spec.description = 'fir.im command tool, support iOS and Android'
@@ -27,9 +27,7 @@ Gem::Specification.new do |spec|
27
27
  /_/ /___/_/ |_| \____/_____/___/
28
28
 
29
29
  ## 更新记录
30
- ### fir-cli 1.5.1
31
- - 修复了在 ruby 2.4.0 中登录出错的bug
32
- - 详细更新记录, 请查看: https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG
30
+ - 忽略了证书错误
33
31
  - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源
34
32
  - 欢迎 fork, issue 和 pull request
35
33
  )
@@ -44,5 +42,6 @@ Gem::Specification.new do |spec|
44
42
  spec.add_dependency 'rest-client', '~> 2.0'
45
43
  spec.add_dependency 'ruby_android', '~> 0.7.7'
46
44
  spec.add_dependency 'rqrcode', '~> 0.7'
47
- spec.add_dependency 'xcodeproj', '~> 1.4'
45
+ spec.add_dependency 'xcodeproj', '~> 1.5'
46
+ spec.add_dependency 'api_tools'
48
47
  end
data/fir.sh ADDED
@@ -0,0 +1,46 @@
1
+ #!/bin/sh
2
+ # because fir-cli dependent ruby enviroment, this shell is dependent ruby docker
3
+ # so xcode and gradle not use
4
+ # this shell only use to publish apk or ipa , build is not run
5
+ # fir publish **.apk
6
+ # echo $(curl https://raw.githubusercontent.com/FIRHQ/fir-cli/master/fir.sh) > /usr/local/bin/fir
7
+
8
+ mountFolder=$HOME/fir-cli/data
9
+ destFolder=/fir-cli
10
+
11
+ mkdir -p $mountFolder
12
+
13
+ # find path file name
14
+ function findFileName() {
15
+ echo ${1##*/}
16
+ }
17
+
18
+ # move file to mount folder
19
+ tmpFiles=()
20
+ cmds=()
21
+ for i in $@; do
22
+ if [ -d $i ];then
23
+ cp -r $i $mountFolder
24
+ elif [ -f $i ];then
25
+ cp $i $mountFolder
26
+ else
27
+ cmds+=($i)
28
+ continue
29
+ fi
30
+ destFile=$destFolder/$(findFileName $i)
31
+ cmds+=($destFile)
32
+ tmpFiles+=($mountFolder/$(findFileName $i))
33
+ done
34
+
35
+ # start docker to run fir cmd
36
+ docker run -v $HOME/fir-cli/data:/fir-cli flowci/fir-cli fir ${cmds[@]}
37
+
38
+ # clean folder
39
+ for i in ${tmpFiles}; do
40
+ if [ -d $i ];then
41
+ rm -rf $i
42
+ elif [ -f $i ];then
43
+ rm $i
44
+ fi
45
+ done
46
+
data/install.sh ADDED
@@ -0,0 +1,210 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Copy from: ruby-bootstrap.sh
4
+ # Description: This script bootstraps rvm, Ruby
5
+
6
+ RVM_FRESH_INSTALL=0 # 0=false, 1=true
7
+ MIRROR_CHINA_INSTALL=1 # 0=false, 1=true
8
+
9
+
10
+ ###
11
+ ### Helper variables and functions
12
+ ###
13
+
14
+ # Make the operating system of this host available as $OS.
15
+ OS_UNKNOWN="os-unknown"
16
+ OS_MAC="mac"
17
+ OS_LINUX="linux"
18
+ case `uname` in
19
+ Linux*)
20
+ OS=$OS_LINUX
21
+ ;;
22
+ Darwin*)
23
+ OS=$OS_MAC
24
+ ;;
25
+ *)
26
+ OS=$OS_UNKNOWN
27
+ ;;
28
+ esac
29
+
30
+ # Colors for shell output
31
+ if [ "$OS" = "$OS_MAC" ]; then
32
+ red='\x1B[1;31m'
33
+ green='\x1B[1;32m'
34
+ yellow='\x1B[1;33m'
35
+ blue='\x1B[1;34m'
36
+ nocolor='\x1B[0m'
37
+ else
38
+ red='\e[1;31m'
39
+ green='\e[1;32m'
40
+ yellow='\e[1;33m'
41
+ blue='\e[1;34m'
42
+ nocolor='\e[0m'
43
+ fi
44
+
45
+ function puts() {
46
+ local opts=''
47
+ if [ "$1" = "-n" ]; then
48
+ opts='-n'
49
+ shift
50
+ fi
51
+ msg="$@"
52
+ echo -e $opts "${blue}${msg}${nocolor}"
53
+ }
54
+
55
+ function warn() {
56
+ local opts=''
57
+ if [ "$1" = "-n" ]; then
58
+ opts='-n'
59
+ shift
60
+ fi
61
+ msg="$@"
62
+ echo -e $opts "${yellow}${msg}${nocolor}"
63
+ }
64
+
65
+ function error() {
66
+ local opts=''
67
+ if [ "$1" = "-n" ]; then
68
+ opts='-n'
69
+ shift
70
+ fi
71
+ msg="$@"
72
+ echo -e $opts "${red}${msg}${nocolor}"
73
+ }
74
+
75
+ function success() {
76
+ local opts=''
77
+ if [ "$1" = "-n" ]; then
78
+ opts='-n'
79
+ shift
80
+ fi
81
+ msg="$@"
82
+ echo -e $opts "${green}${msg}${nocolor}"
83
+ }
84
+
85
+ function rvm_post_install_message() {
86
+ warn "Important: We performed a fresh install of rvm for you."
87
+ warn " This means you manually perform two tasks now."
88
+ warn
89
+ warn "Task 1 of 2:"
90
+ warn "------------"
91
+ warn "Please run the following command in all your open shell windows to"
92
+ warn "start using rvm. In rare cases you need to reopen all shell windows."
93
+ warn
94
+ warn " source ~/.rvm/scripts/rvm"
95
+ warn
96
+ warn
97
+ warn "Task 2 of 2:"
98
+ warn "------------"
99
+ warn "Permanently update your shell environment to source/add rvm."
100
+ warn "The example below shows how to do this for Bash."
101
+ warn
102
+ warn "Add the following two lines to your ~/.bashrc:"
103
+ warn
104
+ warn " PATH=\$PATH:\$HOME/.rvm/bin # Add RVM to PATH for scripting"
105
+ warn " [[ -s \"\$HOME/.rvm/scripts/rvm\" ]] && source \"\$HOME/.rvm/scripts/rvm\" # Load RVM into a shell session *as a function*"
106
+ warn
107
+ warn "That's it! Sorry for the extra work but this is the safest"
108
+ warn "way to update your environment without breaking anything."
109
+ }
110
+
111
+ function find_ruby_version_file() {
112
+ local filename=".ruby-version"
113
+ local curr_dir=$1
114
+ curr_dir=`cd "$curr_dir"; pwd`
115
+ local candidate_file="$curr_dir/$filename"
116
+ while [ ! -f "$candidate_file" ]; do
117
+ parent_dir=`cd ..; pwd`
118
+ if [ "$parent_dir" = "$curr_dir" ]; then
119
+ # We have reached /, we can't go up any further.
120
+ candidate_file=""
121
+ break
122
+ else
123
+ curr_dir="$parent_dir"
124
+ candidate_file="$curr_dir/$filename"
125
+ fi
126
+ done
127
+ echo $candidate_file
128
+ }
129
+
130
+ function detect_desired_ruby_version() {
131
+ local desired_ruby_version=""
132
+ ruby_version_file=`find_ruby_version_file $(pwd)`
133
+ if [ -n "$ruby_version_file" ]; then
134
+ desired_ruby_version=`head -n 1 $ruby_version_file`
135
+ fi
136
+ echo $desired_ruby_version
137
+ }
138
+
139
+ # We must detect the desired Ruby version before rvm "manipulates" the shell environment for its own purposes.
140
+ # I assume the cause of the problem is rvm's variant of the 'cd' command (~/.rvm/scripts/cd), which may alter the
141
+ # normal behavior of 'cd' in a way that breaks our usage of 'cd' in the function 'find_ruby_version_file' above.
142
+ puts -n "Detecting desired Ruby version: "
143
+
144
+ RUBY_VERSION=`detect_desired_ruby_version`
145
+
146
+ if [ -z "$RUBY_VERSION" ]; then
147
+ warn "FAILED (could not find .ruby-version) -- falling back to latest stable Ruby version"
148
+ RUBY_VERSION="ruby" # 'ruby' defaults to latest stable version
149
+ else
150
+ success "OK ($RUBY_VERSION)"
151
+ fi
152
+
153
+
154
+ ###
155
+ ### Bootstrap RVM
156
+ ###
157
+ puts -n "Checking for rvm: "
158
+ which rvm &>/dev/null
159
+ if [ $? -ne 0 ]; then
160
+ error "NOT FOUND (If you already ran ruby-bootstrap: have you performed the post-installation steps?)"
161
+ puts "Installing latest stable version of rvm..."
162
+ RVM_FRESH_INSTALL=1
163
+ curl -L https://get.rvm.io | bash -s stable --autolibs=enable --ignore-dotfiles || exit 1
164
+ else
165
+ success "OK"
166
+ fi
167
+
168
+ if [ -d ~/.rvm/bin ]; then
169
+ PATH=$PATH:~/.rvm/bin
170
+ fi
171
+
172
+ source ~/.rvm/scripts/rvm
173
+
174
+ if [ $MIRROR_CHINA_INSTALL -eq 1 ]; then
175
+ echo "ruby_url=https://cache.ruby-china.org/pub/ruby" > ~/.rvm/user/db
176
+ fi
177
+ ###
178
+ ### Install Ruby
179
+ ###
180
+ puts "Installing Ruby version ${RUBY_VERSION}..."
181
+
182
+ rvm install $RUBY_VERSION
183
+
184
+ if [ $? -ne 0 -a $RVM_FRESH_INSTALL -eq 1 ]; then
185
+ rvm_post_install_message
186
+ exit 2
187
+ fi
188
+ if [ $MIRROR_CHINA_INSTALL -eq 1 ]; then
189
+ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
190
+ fi
191
+
192
+ ###
193
+ ### Install Bundler
194
+ ###
195
+ puts "Installing bundler..."
196
+ gem install bundler
197
+ if [ $? -ne 0 -a $RVM_FRESH_INSTALL -eq 1 ]; then
198
+ rvm_post_install_message
199
+ exit 3
200
+ fi
201
+
202
+ puts "Installing fir-cli gem"
203
+ gem install fir-cli --no-rdoc --no-ri
204
+ if [ $? -ne 0 -a $RVM_FRESH_INSTALL -eq 1 ]; then
205
+ rvm_post_install_message
206
+ exit 4
207
+ fi
208
+
209
+
210
+ puts "run fir -v to check"
@@ -3,7 +3,7 @@
3
3
  module RestClient
4
4
  class Request
5
5
  def default_headers
6
- { content_type: :json, source: 'fir-cli', version: FIR::VERSION }
6
+ { source: 'fir-cli', version: FIR::VERSION }
7
7
  end
8
8
  end
9
9
  end
data/lib/fir/util/http.rb CHANGED
@@ -1,30 +1,20 @@
1
- # encoding: utf-8
1
+
2
+ # frozen_string_literal: true
3
+
4
+ require 'api_tools'
2
5
 
3
6
  module FIR
4
7
  module Http
5
- MAX_RETRIES = 5
8
+ include ApiTools::DefaultRestModule
6
9
 
7
- %w(get post patch put).each do |_m|
8
- class_eval <<-METHOD, __FILE__, __LINE__ + 1
9
- def #{_m}(url, params = {})
10
- query = :#{_m} == :get ? { params: params } : params
11
- begin
12
- res = ::RestClient.#{_m}(url, query)
13
- rescue => e
14
- @retries ||= 0
15
- logger.error(e.message.to_s)
16
- if @retries < MAX_RETRIES
17
- @retries += 1
18
- logger.info("Retry \#{@retries} times......")
19
- sleep 2
20
- retry
21
- else
22
- exit 1
23
- end
24
- end
25
- JSON.parse(res.body.force_encoding('UTF-8'), symbolize_names: true)
26
- end
27
- METHOD
10
+ alias old_default_options default_options
11
+ def default_options
12
+ @default_options = old_default_options
13
+ unless ENV['UPLOAD_VERIFY_SSL']
14
+ @default_options.merge!(other_base_execute_option: {
15
+ verify_ssl: OpenSSL::SSL::VERIFY_NONE
16
+ })
17
+ end
28
18
  end
29
19
  end
30
20
  end
@@ -42,19 +42,27 @@ module FIR
42
42
  update_app_info
43
43
  fetch_app_info
44
44
  end
45
+
46
+ %w(binary icon).each do |word|
47
+ define_method("upload_app_#{word}") do
48
+ upload_file(word)
49
+ end
50
+ end
45
51
 
46
- %w(icon binary).each do |postfix|
47
- class_eval <<-METHOD, __FILE__, __LINE__ + 1
48
- def upload_app_#{postfix}
49
- logger.info "Uploading app #{postfix}......"
50
- uploaded_info = post(@#{postfix}_cert[:upload_url], uploading_#{postfix}_info)
52
+ def upload_file(postfix)
53
+ logger.info "Uploading app #{postfix}......"
54
+ url = @uploading_info[:cert][postfix.to_sym][:upload_url]
55
+ info = send("uploading_#{postfix}_info")
56
+ logger.debug "url = #{url}, info = #{info}"
57
+ uploaded_info = post(url, info, {
58
+ params_to_json: false,
59
+ header: nil
60
+ })
51
61
 
52
- return if uploaded_info[:is_completed]
62
+ return if uploaded_info[:is_completed]
53
63
 
54
- logger.error "Uploading app #{postfix} failed"
55
- exit 1
56
- end
57
- METHOD
64
+ logger.error "Uploading app #{postfix} failed"
65
+ exit 1
58
66
  end
59
67
 
60
68
  def uploading_icon_info
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.3'
4
+ VERSION = '1.6.4.beta1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fir-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaixSpirit
8
+ - atpking
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-04-06 00:00:00.000000000 Z
12
+ date: 2018-03-22 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -142,17 +143,31 @@ dependencies:
142
143
  requirements:
143
144
  - - "~>"
144
145
  - !ruby/object:Gem::Version
145
- version: '1.4'
146
+ version: '1.5'
146
147
  type: :runtime
147
148
  prerelease: false
148
149
  version_requirements: !ruby/object:Gem::Requirement
149
150
  requirements:
150
151
  - - "~>"
151
152
  - !ruby/object:Gem::Version
152
- version: '1.4'
153
+ version: '1.5'
154
+ - !ruby/object:Gem::Dependency
155
+ name: api_tools
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
153
168
  description: fir.im command tool, support iOS and Android
154
169
  email:
155
- - neverlandxy.naix@gmail.com
170
+ - atpking@gmail.com
156
171
  executables:
157
172
  - console
158
173
  - fir
@@ -161,9 +176,11 @@ extensions: []
161
176
  extra_rdoc_files: []
162
177
  files:
163
178
  - ".codeclimate.yml"
179
+ - ".flow-plugin.yml"
164
180
  - ".gitignore"
165
181
  - ".travis.yml"
166
182
  - CHANGELOG
183
+ - Dockerfile
167
184
  - Gemfile
168
185
  - LICENSE.txt
169
186
  - README.md
@@ -171,16 +188,15 @@ files:
171
188
  - bin/console
172
189
  - bin/fir
173
190
  - bin/setup
174
- - doc/build_apk.md
175
- - doc/build_ipa.md
176
191
  - doc/help.md
177
192
  - doc/info.md
178
193
  - doc/install.md
179
194
  - doc/login.md
180
- - doc/mapping.md
181
195
  - doc/publish.md
182
196
  - doc/upgrade.md
183
197
  - fir-cli.gemspec
198
+ - fir.sh
199
+ - install.sh
184
200
  - lib/fir-cli.rb
185
201
  - lib/fir.rb
186
202
  - lib/fir/api.yml
@@ -231,9 +247,8 @@ metadata: {}
231
247
  post_install_message: "\n ______________ ________ ____\n /
232
248
  ____/ _/ __ \\ / ____/ / / _/\n / /_ / // /_/ /_____/ / / / /
233
249
  /\n / __/ _/ // _, _/_____/ /___/ /____/ /\n /_/ /___/_/ |_| \\____/_____/___/\n\n
234
- \ ## 更新记录\n ### fir-cli 1.5.1\n - 修复了在 ruby 2.4.0 中登录出错的bug\n - 详细更新记录, 请查看:
235
- https://github.com/FIRHQ/fir-cli/blob/master/CHANGELOG\n - [fir-cli](https://github.com/FIRHQ/fir-cli)
236
- 已经开源\n - 欢迎 fork, issue 和 pull request\n "
250
+ \ ## 更新记录\n - 忽略了证书错误\n - [fir-cli](https://github.com/FIRHQ/fir-cli) 已经开源\n -
251
+ 欢迎 fork, issue 和 pull request\n "
237
252
  rdoc_options: []
238
253
  require_paths:
239
254
  - lib
@@ -244,12 +259,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
244
259
  version: '0'
245
260
  required_rubygems_version: !ruby/object:Gem::Requirement
246
261
  requirements:
247
- - - ">="
262
+ - - ">"
248
263
  - !ruby/object:Gem::Version
249
- version: '0'
264
+ version: 1.3.1
250
265
  requirements: []
251
266
  rubyforge_project:
252
- rubygems_version: 2.6.8
267
+ rubygems_version: 2.6.14
253
268
  signing_key:
254
269
  specification_version: 4
255
270
  summary: fir.im command tool
data/doc/build_apk.md DELETED
@@ -1,42 +0,0 @@
1
- #### fir build_apk
2
-
3
- `fir build_apk` 指令用于编译用 Gradle 打包 apk, 并且支持直接从 Github/Gitlab 相关 repo 直接编译打包.
4
-
5
- ```sh
6
- fir build_apk --help
7
- Usage:
8
- fir build_apk BUILD_DIR
9
-
10
- Options:
11
- -B, [--branch=BRANCH] # Set branch if project is a git repo, the default is `master`
12
- -o, [--output=OUTPUT] # APK output path, the default is: BUILD_DIR/build/outputs/apk
13
- -p, [--publish], [--no-publish] # true/false if publish to fir.im
14
- -f, [--flavor=FLAVOR] # Set flavor if have productFlavors
15
- -s, [--short=SHORT] # Set custom short link if publish to fir.im
16
- -n, [--name=NAME] # Set custom apk name when builded
17
- -c, [--changelog=CHANGELOG] # Set changelog if publish to fir.im, support string/file
18
- -Q, [--qrcode], [--no-qrcode] # Generate qrcode
19
- [--open], [--no-open] # true/false if open for everyone, the default is: true
20
- # Default: true
21
- [--password=PASSWORD] # Set password for app
22
- -T, [--token=TOKEN] # User's API Token at fir.im
23
- -L, [--logfile=LOGFILE] # Path to writable logfile
24
- -V, [--verbose], [--no-verbose] # Show verbose
25
- # Default: true
26
- -q, [--quiet], [--no-quiet] # Silence commands
27
- -h, [--help], [--no-help] # Show this help message and quit
28
- ```
29
-
30
- ```sh
31
- # 简单打包
32
- $ fir build_apk path/to/project
33
-
34
- # 打包并上传
35
- $ fir ba <project dir> [-o <apk output dir> -c <changelog> -p -Q -T <your api token>]
36
-
37
- # 打包指定的 flavor
38
- $ fir ba <project dir> [-f <flavor> -o <apk output dir> -c <changelog> -p -Q -T <your api token>]
39
-
40
- # 打包指定的 git branch
41
- $ fir ba <git ssh url> [-B develop -o <apk output dir> -c <changelog> -p -Q -T <your api token>]
42
- ```
data/doc/build_ipa.md DELETED
@@ -1,66 +0,0 @@
1
- ### fir build_ipa
2
-
3
- `fir build_ipa` 对 `xcodebuild` 原生指令进行了封装, 将常用的参数名简化, 支持全部的自带参数及设置, 同时输出符号表 dSYM 文件, 并且支持直接从 Github/Gitlab 相关 repo 直接编译打包.
4
-
5
- ```sh
6
- $ fir build_ipa --help
7
- fir build_ipa --help
8
- Usage:
9
- fir build_ipa BUILD_DIR [options] [settings]
10
-
11
- Options:
12
- -B, [--branch=BRANCH] # Set branch if project is a git repo, the default is `master`
13
- -w, [--workspace], [--no-workspace] # true/false if build workspace
14
- -S, [--scheme=SCHEME] # Set the scheme NAME if build workspace
15
- -C, [--configuration=CONFIGURATION] # Use the build configuration NAME for building each target
16
- -d, [--destination=DESTINATION] # Set the destinationspecifier
17
- -t, [--target=TARGET] # Build the target specified by targetname
18
- -E, [--export_method=METHOD] # for exportOptionsPlist method, ad-hoc as default
19
- -O, [--optionPlistPath] # User defined exportOptionsPlist path
20
- -f, [--profile=PROFILE] # Set the export provisioning profile
21
- -o, [--output=OUTPUT] # IPA output path, the default is: BUILD_DIR/fir_build_ipa
22
- -p, [--publish], [--no-publish] # true/false if publish to fir.im
23
- -s, [--short=SHORT] # Set custom short link if publish to fir.im
24
- -n, [--name=NAME] # Set custom ipa name when builded
25
- -c, [--changelog=CHANGELOG] # Set changelog if publish to fir.im
26
- -Q, [--qrcode], [--no-qrcode] # Generate qrcode
27
- -M, [--mapping], [--no-mapping] # true/false if upload app mapping file to BugHD.com
28
- -P, [--proj=PROJ] # Project id in BugHD.com if upload app mapping file
29
- [--open], [--no-open] # true/false if open for everyone, the default is: true
30
- # Default: true
31
- [--password=PASSWORD] # Set password for app
32
- -T, [--token=TOKEN] # User's API Token at fir.im
33
- -L, [--logfile=LOGFILE] # Path to writable logfile
34
- -V, [--verbose], [--no-verbose] # Show verbose
35
- # Default: true
36
- -q, [--quiet], [--no-quiet] # Silence commands
37
- -h, [--help], [--no-help] # Show this help message and quit
38
- ```
39
-
40
- 示例:
41
-
42
- - 编译 project, 加上 changelog, 并发布到 fir.im 上并生成二维码图片
43
-
44
- ```
45
- $ fir build_ipa path/to/project -o path/to/output -p -c "this is changelog" -Q -T YOUR_API_TOKEN
46
- ```
47
-
48
- - 编译 Github 上的 workspace
49
-
50
- ```sh
51
- $ fir build_ipa git@github.com:xxxx.git -o path/to/output -w -C Release -t allTargets GCC_PREPROCESSOR_DEFINITIONS="FOO=bar"
52
- ```
53
- 该指令在指向的目录中,找到第一个 workspace 文件, 对其进行编译. 使用 `Release` 设置,编译策略为 `allTargets`, 同时设置了预编译参数 `FOO`.
54
-
55
- - 编译用 CocoaPods 做依赖管理的 .ipa 包
56
-
57
- ```sh
58
- $ fir build_ipa path/to/workspace -w -S <scheme name>
59
- ```
60
-
61
-
62
- **ChangeLog 1.6.0**
63
-
64
- - 支持 XCode 8.3 打包
65
- * 新增参数 -E,指定 exportOptionsPlist plist 文件中的方法, 默认为 ad-hoc
66
- * 用户可自定义 -exportOptionsPlist 中的 plist 路径
data/doc/mapping.md DELETED
@@ -1,22 +0,0 @@
1
- ### fir mapping
2
-
3
- `fir mapping` 指令用于将符号表上传至 [BugHD.com](http://bughd.com) 所对应的项目, 目前已经支持 dSYM 和 txt 两种格式的符号表文件上传, 有以下三种方法上传:
4
-
5
- - 指定 version 和 build 上传:
6
-
7
- ```sh
8
- $ fir m <mapping file path> -P <bughd project id> -v <app version> -b <app build> -T <your api token>
9
- ```
10
-
11
- - 在 publish 的时候自动上传:
12
-
13
- ```sh
14
- $ fir p <app file path> -m <mapping file path> -P <bughd project id> -T <your api token>
15
- ```
16
- - 在 build_ipa 的时候自动上传:
17
-
18
- ```sh
19
- $ fir b <project dir> -P <bughd project id> -M -p -T <your api token>
20
- ```
21
-
22
- 更详细的使用说明, 可以使用 `fir mapping -h`查看相应的帮助.