@@ -23,7 +23,6 @@ def self.setup_constants(platform)
2323 end
2424 end
2525
26- # rubocop:disable Metrics/PerceivedComplexity
2726 def self . run ( params )
2827 platform = params [ :platform ] || Actions . lane_context [ Actions ::SharedValues ::PLATFORM_NAME ]
2928 Helper ::GitHelper . setup_git_user
@@ -53,41 +52,41 @@ def self.run(params)
5352 end
5453 end
5554
56- unless assert_branch_tagged_before_public_release ( params . values )
57- UI . important ( "Skipping release because release branch's HEAD is not tagged." )
58- Helper ::GitHubActionsHelper . set_output ( "stop_workflow" , true )
59- return
60- end
61-
62- if should_merge_before_deleting ( params )
63- begin
64- branch = other_action . git_branch
65- # merge the branch (not the tag) to the base branch first to have untagged commits in the base branch
66- UI . important ( "Merging branch before deleting to have untagged commits in the base branch" )
67- Helper ::GitHelper . merge_branch ( @constants [ :repo_name ] , branch , params [ :base_branch ] , params [ :github_elevated_permissions_token ] || params [ :github_token ] )
68- rescue StandardError => e
69- report_merge_release_branch_before_deleting_failed ( params . values . merge ( branch : branch ) )
70- UI . important ( "Merging release branch to base branch failed. Cannot proceed with the public release. Please merge manually and run the workflow again." )
71- Helper ::GitHubActionsHelper . set_output ( "stop_workflow" , true )
72- Helper ::DdgAppleAutomationHelper . report_error ( e )
73- return
74- end
75- end
76-
77- tag_and_release_output = create_tag_and_github_release ( params [ :is_prerelease ] , platform , params [ :github_token ] )
78- Helper ::GitHubActionsHelper . set_output ( "tag" , tag_and_release_output [ :tag ] )
79-
80- if tag_and_release_output [ :tag_created ]
81- begin
82- merge_or_delete_branch ( params . values . merge ( tag : tag_and_release_output [ :tag ] ) )
83- tag_and_release_output [ :merge_or_delete_successful ] = true
84- rescue StandardError => e
85- tag_and_release_output [ :merge_or_delete_successful ] = false
86- Helper ::DdgAppleAutomationHelper . report_error ( e )
87- end
88- end
89-
90- report_status ( params . values . merge ( tag_and_release_output ) )
55+ # unless assert_branch_tagged_before_public_release(params.values)
56+ # UI.important("Skipping release because release branch's HEAD is not tagged.")
57+ # Helper::GitHubActionsHelper.set_output("stop_workflow", true)
58+ # return
59+ # end
60+
61+ # if should_merge_before_deleting(params)
62+ # begin
63+ # branch = other_action.git_branch
64+ # # merge the branch (not the tag) to the base branch first to have untagged commits in the base branch
65+ # UI.important("Merging branch before deleting to have untagged commits in the base branch")
66+ # Helper::GitHelper.merge_branch(@constants[:repo_name], branch, params[:base_branch], params[:github_elevated_permissions_token] || params[:github_token])
67+ # rescue StandardError => e
68+ # report_merge_release_branch_before_deleting_failed(params.values.merge(branch: branch))
69+ # UI.important("Merging release branch to base branch failed. Cannot proceed with the public release. Please merge manually and run the workflow again.")
70+ # Helper::GitHubActionsHelper.set_output("stop_workflow", true)
71+ # Helper::DdgAppleAutomationHelper.report_error(e)
72+ # return
73+ # end
74+ # end
75+
76+ # tag_and_release_output = create_tag_and_github_release(params[:is_prerelease], platform, params[:github_token])
77+ # Helper::GitHubActionsHelper.set_output("tag", tag_and_release_output[:tag])
78+
79+ # if tag_and_release_output[:tag_created]
80+ # begin
81+ # merge_or_delete_branch(params.values.merge(tag: tag_and_release_output[:tag]))
82+ # tag_and_release_output[:merge_or_delete_successful] = true
83+ # rescue StandardError => e
84+ # tag_and_release_output[:merge_or_delete_successful] = false
85+ # Helper::DdgAppleAutomationHelper.report_error(e)
86+ # end
87+ # end
88+
89+ # report_status(params.values.merge(tag_and_release_output))
9190 end
9291
9392 def self . should_merge_before_deleting ( params )
@@ -110,7 +109,6 @@ def self.assert_branch_tagged_before_public_release(params)
110109 end
111110 true
112111 end
113- # rubocop:enable Metrics/PerceivedComplexity
114112
115113 def self . create_tag_and_github_release ( is_prerelease , platform , github_token )
116114 tag , promoted_tag = Helper ::DdgAppleAutomationHelper . compute_tag ( is_prerelease , platform )
0 commit comments