Skip to content

Commit 53662ac

Browse files
committed
Add check_beta_pods lane
1 parent 8cc0796 commit 53662ac

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
module Fastlane
2+
module Actions
3+
class IosCheckBetaDepsAction < Action
4+
def self.run(params)
5+
require_relative '../../helper/ios/ios_version_helper.rb'
6+
require_relative '../../helper/ios/ios_git_helper.rb'
7+
8+
beta_pods = []
9+
File.open(params[:podfile]).each do | li |
10+
beta_pods << li if (li.match('^\s*\t*pod.*beta'))
11+
end
12+
13+
if beta_pods.count == 0
14+
UI.message("No beta pods found. You can continue with the code freeze.")
15+
else
16+
message = "The following pods are still in beta:\n"
17+
beta_pods.each do | bpod |
18+
message << "#{bpod}\n"
19+
end
20+
message << "Please update to the released version before continuing with the code freeze."
21+
end
22+
UI.important(message)
23+
end
24+
25+
#####################################################
26+
# @!group Documentation
27+
#####################################################
28+
29+
def self.description
30+
"Runs some prechecks before finalizing a release"
31+
end
32+
33+
def self.details
34+
"Runs some prechecks before finalizing a release"
35+
end
36+
37+
def self.available_options
38+
[
39+
FastlaneCore::ConfigItem.new(key: :podfile,
40+
env_name: "FL_IOS_CHECKBETADEPS_PODFILE",
41+
description: "Path to the Podfile to analyse",
42+
is_string: true),
43+
]
44+
end
45+
46+
def self.output
47+
48+
end
49+
50+
def self.return_value
51+
""
52+
end
53+
54+
def self.authors
55+
["loremattei"]
56+
end
57+
58+
def self.is_supported?(platform)
59+
platform == :ios
60+
end
61+
end
62+
end
63+
end

0 commit comments

Comments
 (0)