lib/hu/deploy.rb in hu-1.4.11 vs lib/hu/deploy.rb in hu-1.5.0
- old
+ new
@@ -29,11 +29,11 @@
$stdout.sync
@@shutting_down = false
@@spinner = nil
@@home_branch = nil
- #MINIMUM_GIT_VERSION = Versionomy.parse('2.9.0')
+ # MINIMUM_GIT_VERSION = Versionomy.parse('2.9.0')
text 'Interactive deployment.'
desc 'Interactive deployment'
if Hu::API_TOKEN.nil?
text ''
@@ -148,11 +148,11 @@
unbusy
unless develop_can_be_merged_into_master?
puts
puts "ERROR: It looks like a merge of 'develop' into 'master' would fail.".color(:red)
- puts " Aborting early to prevent a merge conflict.".color(:red)
+ puts ' Aborting early to prevent a merge conflict.'.color(:red)
puts
exit 1
end
highest_version = find_highest_version_tag
@@ -443,16 +443,16 @@
rows.each do |r|
table << r
end
git_version_warning = ''
- #if current_git_version < MINIMUM_GIT_VERSION
+ # if current_git_version < MINIMUM_GIT_VERSION
# git_version_warning = " (your git is outdated. please upgrade to v#{MINIMUM_GIT_VERSION}!)".color(:black).bright
- #end
+ # end
puts "\e[H\e[2J" if clear
- puts " PIPELINE #{pipeline_name} ".inverse+git_version_warning
+ puts " PIPELINE #{pipeline_name} ".inverse + git_version_warning
puts
puts table.render(:unicode, padding: [0, 1, 0, 1], multiline: true)
missing_env = app_config[stag_app_name].keys - app_config[prod_app_name].keys
@@ -854,11 +854,11 @@
EOS
Hu::Tm.t(:abort_merge, cmd: 'deploy')
end
def return_to_home_branch
- return if @@home_branch.nil? or @@home_branch == current_branch_name
+ return if @@home_branch.nil? || @@home_branch == current_branch_name
run_each <<-EOS.strip_heredoc
:quiet
:nospinner
:return
# Return to home branch
@@ -877,15 +877,15 @@
EOS
status == 0
end
def current_branch_name
- @git.head.name.sub(/^refs\/heads\//, '')
+ @git.head.name.sub(%r{^refs\/heads\/}, '')
end
- #def current_git_version
+ # def current_git_version
# Versionomy.parse(`git --version`.chomp.split(' ')[-1])
- #end
+ # end
def create_changelog(env)
if File.executable? '.hu/hooks/changelog'
env.each { |k, v| ENV[k] = v }
`.hu/hooks/changelog`