lib/hu/deploy.rb in hu-1.5.17 vs lib/hu/deploy.rb in hu-1.6.0
- old
+ new
@@ -355,11 +355,11 @@
env = {
'PREVIOUS_TAG' => highest_version,
'RELEASE_TAG' => release_tag,
'GIT_MERGE_AUTOEDIT' => 'no'
}
- unless 0 == finish_release(release_tag, env)
+ unless 0 == finish_release(release_tag, env, tf.path)
abort_merge
puts '*** ERROR! Could not finish release *** '.color(:red)
puts
puts 'This usually means a merge conflict or'
puts 'something equally annoying has occured.'
@@ -402,11 +402,11 @@
end
end
def show_pipeline_status(pipeline_name, stag_app_name, prod_app_name, release_tag, clear = true)
table = TTY::Table.new header: ['', 'commit', 'tag', 'last_modified', 'last_modified_by', 'dynos', '']
- busy 'synchronizing', :huroku
+ busy 'synchronizing', :dots
ts = []
workers = []
tpl_row = ['?', '', '', '', '', '', '']
revs = ThreadSafe::Hash.new
app_config = ThreadSafe::Hash.new
@@ -890,11 +890,11 @@
# Push develop to origin
git push origin develop
EOS
end
- def finish_release(release_tag, env)
+ def finish_release(release_tag, env, changelog_path)
env.each { |k, v| ENV[k] = v }
if File.executable? '.hu/hooks/pre_release'
run_each <<-EOS.strip_heredoc
# Run pre-release hook
.hu/hooks/pre_release
@@ -904,9 +904,14 @@
run_each <<-EOS.strip_heredoc
:stream
:return
# Finish release
git flow release finish #{release_tag}
+
+ # Adjust merge message
+ git checkout master
+ git commit --amend -F #{changelog_path}
+ git tag -f #{release_tag}
# Push final master (#{release_tag}) to origin
git push origin master
git push origin --tags