release: cleanup patch, minor, major
This commit is contained in:
@@ -26,17 +26,25 @@ module Release
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
def validate_version_format (version)
|
||||
error "invalid version number format: #{version}" unless version =~ /\d+\.\d+\.\d+/
|
||||
error "Invalid version number format. Try using MAJOR.MINOR.PATCH." unless version =~ /\d+\.\d+\.\d+/
|
||||
end
|
||||
|
||||
def validate_version_is_new (version)
|
||||
error "version already exists: #{git_local_list_tags.join(' ')}" if git_local_list_tags.include? "v#{version}"
|
||||
error "Version already exists: #{git_local_list_tags.join(' ')}" if git_local_list_tags.include? "v#{version}"
|
||||
end
|
||||
|
||||
def validate_version_exists (version)
|
||||
error "Version does not exist: #{git_local_list_tags.join(' ')}" unless git_local_list_tags.include? "v#{version}"
|
||||
end
|
||||
|
||||
def validate_current_branch_master
|
||||
error "invalid starting branch: #{current_branch}" 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
|
||||
|
||||
def validate_release_branch_does_not_exist (branch)
|
||||
error "Version branch already exists: #{branch}" if remote_branch(branch) != ""
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user