Skip to content

Commit 7a189e9

Browse files
committed
Check Git tags on remote
1 parent 1598c31 commit 7a189e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastlane/lanes/release.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
previous_release_branch = "release/#{previous_version}"
217217

218218
# Determine the base for the hotfix branch: either a tag or a release branch
219-
base_ref_for_hotfix = if git_tag_exists(tag: previous_version)
219+
base_ref_for_hotfix = if git_tag_exists(tag: previous_version, remote: true)
220220
previous_version
221221
elsif Fastlane::Helper::GitHelper.branch_exists_on_remote?(branch_name: previous_release_branch)
222222
UI.message("ℹ️ Tag '#{previous_version}' not found on the remote. Using release branch '#{previous_release_branch}' as the base for hotfix instead.")
@@ -243,7 +243,7 @@
243243
UI.user_error!('Aborted by user request') unless skip_confirm || UI.confirm('Do you want to continue?')
244244

245245
# Check tags
246-
UI.user_error!("The version `#{new_version}` tag already exists!") if git_tag_exists(tag: new_version)
246+
UI.user_error!("Version '#{new_version}' already exists on the remote! Abort!") if git_tag_exists(tag: new_version, remote: true)
247247

248248
# Create the hotfix branch
249249
UI.message("Creating hotfix branch from '#{base_ref_for_hotfix}'...")

0 commit comments

Comments
 (0)