1
+ module Fastlane
2
+ module Actions
3
+ class IosCompletecodefreezePrechecksAction < Action
4
+ def self . run ( params )
5
+ UI . message "Skip confirm: #{ params [ :skip_confirm ] } "
6
+
7
+ require_relative '../../helper/ios/ios_version_helper.rb'
8
+ require_relative '../../helper/ios/ios_git_helper.rb'
9
+
10
+ UI . user_error! ( "This is not a release branch. Abort." ) unless other_action . git_branch . start_with? ( "release/" )
11
+
12
+ version = Fastlane ::Helpers ::IosVersionHelper ::get_public_version
13
+ message = "Completing code freeze for: #{ version } \n "
14
+ if ( !params [ :skip_confirm ] )
15
+ if ( !UI . confirm ( "#{ message } Do you want to continue?" ) )
16
+ UI . user_error! ( "Aborted by user request" )
17
+ end
18
+ else
19
+ UI . message ( message )
20
+ end
21
+
22
+ # Check local repo status
23
+ other_action . ensure_git_status_clean ( )
24
+
25
+ version
26
+ end
27
+
28
+ #####################################################
29
+ # @!group Documentation
30
+ #####################################################
31
+
32
+ def self . description
33
+ "Runs some prechecks before finalizing a code freeze"
34
+ end
35
+
36
+ def self . details
37
+ "Runs some prechecks before finalizing a code freeze"
38
+ end
39
+
40
+ def self . available_options
41
+ [
42
+ FastlaneCore ::ConfigItem . new ( key : :skip_confirm ,
43
+ env_name : "FL_IOS_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM" ,
44
+ description : "Skips confirmation" ,
45
+ is_string : false , # true: verifies the input is a string, false: every kind of value
46
+ default_value : false ) # the default value if the user didn't provide one
47
+ ]
48
+ end
49
+
50
+ def self . output
51
+
52
+ end
53
+
54
+ def self . return_value
55
+
56
+ end
57
+
58
+ def self . authors
59
+ [ "loremattei" ]
60
+ end
61
+
62
+ def self . is_supported? ( platform )
63
+ platform == :ios
64
+ end
65
+ end
66
+ end
67
+ end
0 commit comments