fastlane-plugin-maintenance 0.1.0 → 0.2.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1f0e0fdb76b5c86eb70449d7eda5537f8c5675df21052407df553ba1dfdc3ba
|
4
|
+
data.tar.gz: c5c41b513d63c4d3211351cb9e6d7a323312a72c35bf093437370847839e15f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07014b4221a386cfb2f4502cea63fec8e34264e2f04917e1edb56b156fb13fe2c1554fe0a8fbd1e8f602613aed7d5327724e7a728c400103dc1f8a61004eb3fc
|
7
|
+
data.tar.gz: 10fc68069bb9c4127e393206ffbe64dbc8be00bc6e0bd0d7234d356458466c43fb91c6c8610487010b8daf86807aa86181a911954b923ec38142a3f7c417f119
|
data/README.md
CHANGED
@@ -12,13 +12,34 @@ fastlane add_plugin maintenance
|
|
12
12
|
|
13
13
|
## About maintenance
|
14
14
|
|
15
|
-
Maintenance actions for plugin repos.
|
16
|
-
|
15
|
+
Maintenance actions for plugin repos.
|
16
|
+
|
17
|
+
### rake action
|
18
|
+
|
19
|
+
```bash
|
20
|
+
rake task: :release
|
21
|
+
```
|
22
|
+
|
23
|
+
```bash
|
24
|
+
rake task: :default
|
25
|
+
```
|
26
|
+
|
27
|
+
```bash
|
28
|
+
rake task: :default, rakefile: "Rakefile"
|
29
|
+
```
|
30
|
+
|
31
|
+
General-purpose rake action to build tasks from a Rakefile.
|
32
|
+
|
33
|
+
|Parameter|Description|
|
34
|
+
|---------|-----------|
|
35
|
+
|task|The task to build. Symbol or String.|
|
36
|
+
|rakefile|The Rakefile to use. Defaults to "Rakefile"|
|
37
|
+
|options|Options for the task. Pass an array for multiple options.|
|
17
38
|
|
18
39
|
### update_rubocop action
|
19
40
|
|
20
41
|
```bash
|
21
|
-
|
42
|
+
update_rubocop
|
22
43
|
```
|
23
44
|
|
24
45
|
Updates rubocop to the latest version. Pins your gemspec to a new version of rubocop if
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require "fastlane/action"
|
2
|
+
require "rake"
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
class RakeAction < Action
|
7
|
+
class << self
|
8
|
+
include Rake::DSL
|
9
|
+
|
10
|
+
def run(params)
|
11
|
+
if File.exist?(params[:rakefile])
|
12
|
+
# Can't require. Because no .rb?
|
13
|
+
# rubocop: disable Security/Eval
|
14
|
+
eval File.read(params[:rakefile])
|
15
|
+
# rubocop: enable Security/Eval
|
16
|
+
end
|
17
|
+
|
18
|
+
case params[:options]
|
19
|
+
when Array
|
20
|
+
# Can pass multiple options as an array
|
21
|
+
args = *params[:options]
|
22
|
+
else
|
23
|
+
args = params[:options]
|
24
|
+
end
|
25
|
+
|
26
|
+
UI.header "rake #{params[:task]}"
|
27
|
+
Rake::Task[params[:task]].invoke args
|
28
|
+
end
|
29
|
+
|
30
|
+
def available_options
|
31
|
+
[
|
32
|
+
FastlaneCore::ConfigItem.new(
|
33
|
+
key: :task,
|
34
|
+
description: "Rake task to build",
|
35
|
+
is_string: false
|
36
|
+
),
|
37
|
+
FastlaneCore::ConfigItem.new(
|
38
|
+
key: :rakefile,
|
39
|
+
description: "Rakefile to use",
|
40
|
+
type: String,
|
41
|
+
optional: true,
|
42
|
+
default_value: "Rakefile",
|
43
|
+
verify_block: ->(path) { File.open(path); true }
|
44
|
+
),
|
45
|
+
FastlaneCore::ConfigItem.new(
|
46
|
+
key: :options,
|
47
|
+
description: "Options for task",
|
48
|
+
is_string: false,
|
49
|
+
optional: true
|
50
|
+
)
|
51
|
+
]
|
52
|
+
end
|
53
|
+
|
54
|
+
def description
|
55
|
+
"General-purpose rake action to invoke tasks from a Rakefile or elsewhere."
|
56
|
+
end
|
57
|
+
|
58
|
+
def authors
|
59
|
+
["Jimmy Dee"]
|
60
|
+
end
|
61
|
+
|
62
|
+
def example_code
|
63
|
+
[
|
64
|
+
"rake task: :release",
|
65
|
+
"rake task: :default",
|
66
|
+
%(rake task: :default, rakefile: "Rakefile")
|
67
|
+
]
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -90,29 +90,26 @@ module Fastlane
|
|
90
90
|
adjust_target_ruby_version
|
91
91
|
|
92
92
|
UI.message "1. Running rubocop --auto-correct. This may fail."
|
93
|
-
sh "bundle exec rubocop --auto-correct", print_command_output: false do |status|
|
93
|
+
sh "bundle exec rubocop --auto-correct", print_command_output: false do |status, output|
|
94
|
+
output.split("\n").each do |line|
|
95
|
+
adjust_namespace(line) if line =~ /has the wrong namespace/
|
96
|
+
end
|
97
|
+
|
94
98
|
if status.success?
|
95
99
|
UI.success "Done ✅"
|
96
100
|
return
|
97
101
|
end
|
98
102
|
end
|
99
103
|
|
100
|
-
UI.message "2. Running rubocop --display-cop-names
|
104
|
+
UI.message "2. Running rubocop --display-cop-names to disable failing cops. This may fail."
|
101
105
|
sh "bundle exec rubocop --display-cop-names", print_command_output: false do |status, output, command|
|
102
106
|
if status.success?
|
103
107
|
UI.success "Done ✅"
|
104
108
|
return
|
105
109
|
end
|
106
110
|
|
107
|
-
UI.message "Adjusting changed namespaces and disabling failing cops."
|
108
|
-
|
109
111
|
output.split("\n").each do |line|
|
110
|
-
|
111
|
-
when /has the wrong namespace/
|
112
|
-
adjust_namespace line
|
113
|
-
else
|
114
|
-
add_failing_cop line
|
115
|
-
end
|
112
|
+
add_failing_cop line
|
116
113
|
end
|
117
114
|
|
118
115
|
disable_failing_cops
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-maintenance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Dee
|
@@ -25,13 +25,13 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.5.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
|
-
type: :
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
@@ -39,35 +39,35 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: fastlane
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.69.0
|
62
62
|
type: :development
|
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:
|
68
|
+
version: 2.69.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: pry
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- LICENSE
|
146
146
|
- README.md
|
147
147
|
- lib/fastlane/plugin/maintenance.rb
|
148
|
+
- lib/fastlane/plugin/maintenance/actions/rake_action.rb
|
148
149
|
- lib/fastlane/plugin/maintenance/actions/update_rubocop_action.rb
|
149
150
|
- lib/fastlane/plugin/maintenance/helper/maintenance_helper.rb
|
150
151
|
- lib/fastlane/plugin/maintenance/version.rb
|