release: cleanup trash
This commit is contained in:
@@ -39,6 +39,10 @@ module Release
|
|||||||
error "Version does not exist: #{git_local_list_tags.join(' ')}" unless git_local_list_tags.include? "v#{version}"
|
error "Version does not exist: #{git_local_list_tags.join(' ')}" unless git_local_list_tags.include? "v#{version}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def validate_current_branch_is_release
|
||||||
|
error "Invalid release branch: #{current_branch}" unless current_branch =~ /\d+\.\d+\.\d+/
|
||||||
|
end
|
||||||
|
|
||||||
def validate_current_branch_master
|
def validate_current_branch_master
|
||||||
error "Invalid starting branch: #{current_branch}. Try switching to #{standard_branches.join(' ')}." unless standard_branches.include? current_branch
|
error "Invalid starting branch: #{current_branch}. Try switching to #{standard_branches.join(' ')}." unless standard_branches.include? current_branch
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ module Release
|
|||||||
|
|
||||||
release_branch = current_branch
|
release_branch = current_branch
|
||||||
|
|
||||||
error "missing confirmation of branch: #{release_branch}" if confirmation_branch == ''
|
error "Missing confirmation of branch: #{release_branch}" if confirmation_branch == ''
|
||||||
error "confirmation branch does not match current branch: #{confirmation_branch} vs #{release_branch}" if release_branch != confirmation_branch
|
error "Confirmation branch does not match current branch: #{confirmation_branch} vs #{release_branch}" if release_branch != confirmation_branch
|
||||||
error "invalid release branch: #{release_branch}" unless current_branch =~ /\d+\.\d+\.\d+/
|
validate_current_branch_is_release
|
||||||
|
|
||||||
git_checkout 'master'
|
git_checkout 'master'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user