fastlane-plugin-rome 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 +57 -0
- data/lib/fastlane/plugin/rome.rb +16 -0
- data/lib/fastlane/plugin/rome/actions/rome_action.rb +130 -0
- data/lib/fastlane/plugin/rome/helper/rome_helper.rb +12 -0
- data/lib/fastlane/plugin/rome/version.rb +5 -0
- metadata +133 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6695cdc9e131a778464ddeb2b93d34fb84a07185
|
4
|
+
data.tar.gz: b022c43883af6abc6299daad3250ccd763e8085b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b0effb25cda6393fb66b74b95d384a1c16483ec29d13dad19f9446fbeaa6b016ae8fcf5a5caafcc3330add9fc98d6b545b8b06cde18163412abf662b4e8512fa
|
7
|
+
data.tar.gz: 1506da48eeb23ea4b4c9053ea29b3018885b024d5e7c18217a478bee9e1bf5f9d459a94edee2f4ed4d5c6b2c2ae37435c8b891e377727b085d8f16ad4770a2ef
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 François Benaiteau <francois.benaiteau@sharecare.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,57 @@
|
|
1
|
+
# rome plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-rome)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-rome`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin rome
|
11
|
+
```
|
12
|
+
|
13
|
+
## About rome
|
14
|
+
|
15
|
+
A S3 cache tool for Carthage
|
16
|
+
|
17
|
+
Please see more on the tool's repo: [Rome](https://github.com/blender/rome)
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
```bash
|
22
|
+
rome(
|
23
|
+
frameworks: ["MyFramework1", "MyFramework2"], # Specify which frameworks to upload or download
|
24
|
+
command: "upload", # One of: download, upload, list
|
25
|
+
verbose: false, # Print rome output inline
|
26
|
+
platform: "all", # Define which platform to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, ‘tvOS‘, or comma-separated values of the formers except for ‘all’)
|
27
|
+
)
|
28
|
+
```
|
29
|
+
|
30
|
+
## Run tests for this plugin
|
31
|
+
|
32
|
+
To run both the tests, and code style validation, run
|
33
|
+
|
34
|
+
```
|
35
|
+
rake
|
36
|
+
```
|
37
|
+
|
38
|
+
To automatically fix many of the styling issues, use
|
39
|
+
```
|
40
|
+
rubocop -a
|
41
|
+
```
|
42
|
+
|
43
|
+
## Issues and Feedback
|
44
|
+
|
45
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
46
|
+
|
47
|
+
## Troubleshooting
|
48
|
+
|
49
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
50
|
+
|
51
|
+
## Using `fastlane` Plugins
|
52
|
+
|
53
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
54
|
+
|
55
|
+
## About `fastlane`
|
56
|
+
|
57
|
+
`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/rome/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Rome
|
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::Rome.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,130 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class RomeAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
check_tools!
|
6
|
+
validate(params)
|
7
|
+
|
8
|
+
cmd = ["rome"]
|
9
|
+
command_name = params[:command]
|
10
|
+
|
11
|
+
if command_name == "version"
|
12
|
+
cmd << "--version"
|
13
|
+
elsif command_name == "help"
|
14
|
+
cmd << "--help"
|
15
|
+
else
|
16
|
+
cmd << command_name
|
17
|
+
end
|
18
|
+
|
19
|
+
if (command_name == "upload" || command_name == "download") && params[:frameworks].count > 0
|
20
|
+
cmd.concat params[:frameworks]
|
21
|
+
elsif command_name == "list"
|
22
|
+
cmd << "--missing" if params[:missing] == true
|
23
|
+
end
|
24
|
+
|
25
|
+
cmd << "--platform #{params[:platform]}" if params[:platform]
|
26
|
+
cmd << "-v " if params[:verbose]
|
27
|
+
|
28
|
+
Actions.sh(cmd.join(' '))
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.validate(params)
|
32
|
+
unless params
|
33
|
+
Actions.sh("rome --help")
|
34
|
+
exit
|
35
|
+
end
|
36
|
+
|
37
|
+
command_name = params[:command]
|
38
|
+
if !(command_name == "upload" || command_name == "download") && params[:frameworks].count > 0
|
39
|
+
UI.user_error!("Frameworks option is available only for 'upload'' or 'download' commands.")
|
40
|
+
end
|
41
|
+
if command_name != "list" && params[:missing]
|
42
|
+
UI.user_error!("Missing option is available only for 'list' command.")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.check_tools!
|
47
|
+
unless `which rome`.include?('rome')
|
48
|
+
UI.important("Install Rome for the plugin to work")
|
49
|
+
UI.important("")
|
50
|
+
UI.error("Install it using (Homebrew):")
|
51
|
+
UI.command("brew install blender/homebrew-tap/rome")
|
52
|
+
UI.error("")
|
53
|
+
UI.error("If you don't have homebrew, visit http://brew.sh")
|
54
|
+
|
55
|
+
UI.user_error!("Install Rome and start your lane again!")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.available_commands
|
60
|
+
%w(list download upload version help)
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.available_platforms
|
64
|
+
%w(all iOS Mac tvOS watchOS)
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.description
|
68
|
+
"An S3 cache tool for Carthage"
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.authors
|
72
|
+
["François Benaiteau"]
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.details
|
76
|
+
"Rome is a tool that allows developers on Apple platforms to use Amazon's S3 as a shared cache for frameworks built with Carthage."
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.available_options
|
80
|
+
[
|
81
|
+
FastlaneCore::ConfigItem.new(key: :command,
|
82
|
+
env_name: "FL_ROME_COMMAND",
|
83
|
+
description: "Rome command (one of: #{available_commands.join(', ')})",
|
84
|
+
default_value: "help",
|
85
|
+
verify_block: proc do |value|
|
86
|
+
UI.user_error!("Please pass a valid command. Use one of the following: #{available_commands.join(', ')}") unless available_commands.include? value
|
87
|
+
end),
|
88
|
+
FastlaneCore::ConfigItem.new(key: :verbose,
|
89
|
+
env_name: "FL_ROME_VERBOSE",
|
90
|
+
description: "Print xcodebuild output inline",
|
91
|
+
is_string: false,
|
92
|
+
optional: true,
|
93
|
+
verify_block: proc do |value|
|
94
|
+
UI.user_error!("Please pass a valid value for verbose. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
|
95
|
+
end),
|
96
|
+
FastlaneCore::ConfigItem.new(key: :platform,
|
97
|
+
env_name: "FL_ROME_PLATFORM",
|
98
|
+
description: "Define which platform to build for",
|
99
|
+
optional: true,
|
100
|
+
verify_block: proc do |value|
|
101
|
+
value.split(',').each do |platform|
|
102
|
+
UI.user_error!("Please pass a valid platform. Use one of the following: #{available_platforms.join(', ')}") unless available_platforms.map(&:downcase).include?(platform.downcase)
|
103
|
+
end
|
104
|
+
end),
|
105
|
+
FastlaneCore::ConfigItem.new(key: :missing,
|
106
|
+
env_name: "FL_ROME_MISSING",
|
107
|
+
description: "Option to list only missing frameworks",
|
108
|
+
optional: true,
|
109
|
+
is_string: false,
|
110
|
+
verify_block: proc do |value|
|
111
|
+
UI.user_error!("Please pass a valid value for missing. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
|
112
|
+
end),
|
113
|
+
|
114
|
+
FastlaneCore::ConfigItem.new(key: :frameworks,
|
115
|
+
description: "Framework name or names to upload/download, could be applied only along with the 'upload' or 'download' commands",
|
116
|
+
default_value: [],
|
117
|
+
is_string: false,
|
118
|
+
type: Array)
|
119
|
+
]
|
120
|
+
end
|
121
|
+
|
122
|
+
def self.is_supported?(platform)
|
123
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
124
|
+
# See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
125
|
+
#
|
126
|
+
%i(ios mac).include?(platform)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Helper
|
3
|
+
class RomeHelper
|
4
|
+
# class methods that you define here become available in your action
|
5
|
+
# as `Helper::RomeHelper.your_method`
|
6
|
+
#
|
7
|
+
def self.show_message
|
8
|
+
UI.message("Hello from the rome plugin helper!")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-rome
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- François Benaiteau
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pry
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
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: rspec
|
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: rake
|
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: rubocop
|
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: fastlane
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.22.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.22.0
|
97
|
+
description:
|
98
|
+
email: francois.benaiteau@gmail.com
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- LICENSE
|
104
|
+
- README.md
|
105
|
+
- lib/fastlane/plugin/rome.rb
|
106
|
+
- lib/fastlane/plugin/rome/actions/rome_action.rb
|
107
|
+
- lib/fastlane/plugin/rome/helper/rome_helper.rb
|
108
|
+
- lib/fastlane/plugin/rome/version.rb
|
109
|
+
homepage: https://github.com/netbe/fastlane-plugin-rome
|
110
|
+
licenses:
|
111
|
+
- MIT
|
112
|
+
metadata: {}
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
requirements: []
|
128
|
+
rubyforge_project:
|
129
|
+
rubygems_version: 2.6.8
|
130
|
+
signing_key:
|
131
|
+
specification_version: 4
|
132
|
+
summary: An S3 cache tool for Carthage
|
133
|
+
test_files: []
|