fastlane-plugin-fir_cli 0.1.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +72 -0
- data/lib/fastlane/plugin/fir_cli.rb +16 -0
- data/lib/fastlane/plugin/fir_cli/actions/fir_cli_action.rb +109 -0
- data/lib/fastlane/plugin/fir_cli/helper/fir_cli_helper.rb +16 -0
- data/lib/fastlane/plugin/fir_cli/version.rb +5 -0
- metadata +202 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 82168a62b01664bef65558521532fa8cafcbe27fa606f53c9737fcd3c9b1e347
|
4
|
+
data.tar.gz: 62c7c83cf29efd7ec0596ba08e2b5c44139c22fece34945b5e6ee9bc43f07209
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6f52105051ae2eccd687642799249ab2229b4b55a56d619ff517bc99292d9479a5d287be1730656b662509872a9f6d69f76349f6189beb53d50a8085f187beb1
|
7
|
+
data.tar.gz: 6a9a73f6ffb72e0b07748d58bc80d0c652fbe6e5617a923ced7abac9393d83576cd2fd24d4cb06049a443d03c15a70e8026c223d98d338e218c4bad3e3d8a2e5
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 atpking <atpking@gmail.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# fir_cli plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-fir_cli)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-fir_cli`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin fir_cli
|
11
|
+
```
|
12
|
+
|
13
|
+
## About fir_cli
|
14
|
+
|
15
|
+
Using fir-cli gem, upload ipa or apk to fir.im in fastlane directly.
|
16
|
+
|
17
|
+
内置 fir-cli 这个gem, 直接在fastlane 中直接将文件上传到 fir.im
|
18
|
+
|
19
|
+
## params
|
20
|
+
|
21
|
+
run `fastlane action fir_cli` in terminal to lookup the details.
|
22
|
+
|
23
|
+
在命令行中运行 `fastlane action fir_cli` 查看细节.
|
24
|
+
|
25
|
+
|
26
|
+
## Example
|
27
|
+
|
28
|
+
run fir_plugin in Fastfile
|
29
|
+
|
30
|
+
在 Fastfile 文件中 引入
|
31
|
+
|
32
|
+
```
|
33
|
+
default_platform(:ios)
|
34
|
+
|
35
|
+
platform :ios do
|
36
|
+
lane :gofir do
|
37
|
+
gym export_method: "ad-hoc"
|
38
|
+
fir_cli api_token: "YOUR FIR API TOKEN"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# run `fastlane gofir` in terminal to start lane gofir
|
43
|
+
```
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
run fir plugin in bash
|
48
|
+
在终端跑这个插件
|
49
|
+
|
50
|
+
|
51
|
+
```
|
52
|
+
fastlane run fir_cli api_token:"YOUR_FIR_API_TOKEN" specify_file_path:"YOUR IPA OR APK FILE PATH"
|
53
|
+
```
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
## Issues and Feedback
|
59
|
+
|
60
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
61
|
+
|
62
|
+
## Troubleshooting
|
63
|
+
|
64
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
65
|
+
|
66
|
+
## Using _fastlane_ Plugins
|
67
|
+
|
68
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
69
|
+
|
70
|
+
## About _fastlane_
|
71
|
+
|
72
|
+
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/fir_cli/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module FirCli
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::FirCli.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require 'fir'
|
3
|
+
# require 'byebug'
|
4
|
+
require_relative '../helper/fir_cli_helper'
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
class FirCliAction < Action
|
9
|
+
|
10
|
+
def self.run(params)
|
11
|
+
UI.message("The fir_cli plugin is working!")
|
12
|
+
|
13
|
+
fir_args = find_app_location(params[:specify_file_path])
|
14
|
+
options = {
|
15
|
+
token: params[:api_token],
|
16
|
+
specify_file_path: params[:specify_file_path],
|
17
|
+
force_pin_history: params[:force_pin_history],
|
18
|
+
skip_update_icon: params[:skip_update_icon],
|
19
|
+
changelog: params[:changelog],
|
20
|
+
open: params[:open],
|
21
|
+
password: params[:password]
|
22
|
+
}
|
23
|
+
|
24
|
+
FirHelper.publish(fir_args, options)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.description
|
28
|
+
"upload ipa or apk to fir.im"
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.authors
|
32
|
+
["atpking"]
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.return_value
|
36
|
+
# If your method provides a return value, you can describe here what it does
|
37
|
+
"fir app info"
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.details
|
41
|
+
# Optional:
|
42
|
+
"invoke fir-cli from fastlane plugin directly. \nfir-cli: https://github.com/FIRHQ/fir-cli"
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.available_options
|
46
|
+
[
|
47
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
48
|
+
env_name: "FIR_CLI_API_TOKEN",
|
49
|
+
description: "A description of your option",
|
50
|
+
optional: false,
|
51
|
+
type: String),
|
52
|
+
FastlaneCore::ConfigItem.new(key: :specify_file_path,
|
53
|
+
env_name: "FIR_SPECIFY_FILE_PATH",
|
54
|
+
description: "FILE APP PATH",
|
55
|
+
default_value: nil,
|
56
|
+
optional: true),
|
57
|
+
FastlaneCore::ConfigItem.new(key: :force_pin_history,
|
58
|
+
env_name: "FIR_APP_FORCE_PIN_HISTORY",
|
59
|
+
description: "pin this release to download page",
|
60
|
+
default_value: false,
|
61
|
+
optional: true),
|
62
|
+
FastlaneCore::ConfigItem.new(key: :skip_update_icon,
|
63
|
+
env_name: "FIR_APP_SKIP_UPDATE_ICON",
|
64
|
+
description: "skip upload icon",
|
65
|
+
default_value: false,
|
66
|
+
optional: true),
|
67
|
+
FastlaneCore::ConfigItem.new(key: :changelog,
|
68
|
+
env_name: "FIR_APP_CHANGELOG",
|
69
|
+
description: "changelog path or content",
|
70
|
+
default_value: false,
|
71
|
+
optional: true),
|
72
|
+
FastlaneCore::ConfigItem.new(key: :open,
|
73
|
+
env_name: "FIR_APP_OPEN",
|
74
|
+
description: "true/false if open for everyone",
|
75
|
+
default_value: true,
|
76
|
+
optional: true),
|
77
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
78
|
+
env_name: "FIR_APP_PASSWORD",
|
79
|
+
description: "Set password for app",
|
80
|
+
default_value: nil,
|
81
|
+
optional: true)
|
82
|
+
|
83
|
+
]
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.is_supported?(platform)
|
87
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
88
|
+
# See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
|
89
|
+
#
|
90
|
+
# [:ios, :mac, :android].include?(platform)
|
91
|
+
true
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.find_app_location(file_path)
|
95
|
+
file_path || Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
class FirHelper
|
100
|
+
include FIR::Util
|
101
|
+
|
102
|
+
class << self
|
103
|
+
def logger
|
104
|
+
@logger ||= Logger.new(STDOUT)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
|
5
|
+
|
6
|
+
module Helper
|
7
|
+
class FirCliHelper
|
8
|
+
# class methods that you define here become available in your action
|
9
|
+
# as `Helper::FirCliHelper.your_method`
|
10
|
+
#
|
11
|
+
def self.show_message
|
12
|
+
UI.message("Hello from the fir_cli plugin helper!")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-fir_cli
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- atpking
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: fir-cli
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.7.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.7.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec_junit_formatter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.49.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.49.1
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-require_tools
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: fastlane
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 2.136.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 2.136.0
|
167
|
+
description:
|
168
|
+
email: atpking@gmail.com
|
169
|
+
executables: []
|
170
|
+
extensions: []
|
171
|
+
extra_rdoc_files: []
|
172
|
+
files:
|
173
|
+
- LICENSE
|
174
|
+
- README.md
|
175
|
+
- lib/fastlane/plugin/fir_cli.rb
|
176
|
+
- lib/fastlane/plugin/fir_cli/actions/fir_cli_action.rb
|
177
|
+
- lib/fastlane/plugin/fir_cli/helper/fir_cli_helper.rb
|
178
|
+
- lib/fastlane/plugin/fir_cli/version.rb
|
179
|
+
homepage: https://github.com/FIRHQ/fastlane-plugin-fir_cli
|
180
|
+
licenses:
|
181
|
+
- MIT
|
182
|
+
metadata: {}
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
require_paths:
|
186
|
+
- lib
|
187
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
|
+
requirements:
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0'
|
197
|
+
requirements: []
|
198
|
+
rubygems_version: 3.0.3
|
199
|
+
signing_key:
|
200
|
+
specification_version: 4
|
201
|
+
summary: upload ipa or apk to fir.im
|
202
|
+
test_files: []
|