Skip to content

Commit

Permalink
fix: Dynamic abortion
Browse files Browse the repository at this point in the history
  • Loading branch information
gileadeteixeira committed Feb 28, 2024
1 parent 863168b commit ab3565f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,16 @@ def self.get_greater_version(minimal, ios, android)
v_name = latest_version.version_string
v_name_array = v_name.split('.').map { |value| value.to_i }

can_abort = params[:abort_in_hotfix_reviewing]

if ((v_state == "WAITING_FOR_REVIEW" || v_state == "IN_REVIEW") && v_name_array.last > 0)
UI.error "App Store Connect is processing a hotfix! Version: #{v_name}; Status: #{v_state}"
exit(false)
message = "App Store Connect is processing a hotfix! [Version: #{v_name} / Status: #{v_state}]"
if (can_abort)
UI.error message
exit(false)
else
UI.important message
end
end
end
end
Expand Down Expand Up @@ -221,6 +228,14 @@ def self.available_options
ENV["FASTLANE_ITC_TEAM_ID"] = value.to_s
end
),
FastlaneCore::ConfigItem.new(
key: :abort_in_hotfix_reviewing,
env_name: "ABORT_IN_HOTFIX_REVIEWING",
description: "Whether should exit the process if App Store Connect is reviewing a hotfix (iOS platform only)",
optional: true,
default_value: true,
type: Object
),
]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/auto_version_name/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module AutoVersionName
VERSION = "0.3.0"
VERSION = "0.3.1"
end
end

0 comments on commit ab3565f

Please sign in to comment.