lib/hu/deploy.rb in hu-2.0.6 vs lib/hu/deploy.rb in hu-2.0.7

- old
+ new

@@ -54,10 +54,11 @@ require 'rainbow/ext/string' print 'n' require 'platform-api' print 'c' require 'version_sorter' + require 'notifier' print 'h' require 'versionomy' print 'r' require 'tty-prompt' print 'o' @@ -315,12 +316,13 @@ puts ' Nothing else has happened so far. Push this branch to' puts ' ' + stag_app_name.to_s.bright + ' to begin the deploy procedure.' puts end + staging_url = File.exist?('.hu/staging_url') ? File.read('.hu/staging_url').split("\n")[0] : app['web_url'] if release_branch_exists && git_revisions[:release] == git_revisions[stag_app_name] - hyperlink = "\e[1m#{app['web_url']}\e[0m" + hyperlink = "\e[1m#{staging_url}\e[0m" puts ' Phase 2/2 '.inverse + ' Your local ' + "release/#{release_tag}".bright + ' (formerly ' + 'develop'.bright + ') is live on ' + stag_app_name.to_s.bright + '.' puts puts ' Please test here: ' + hyperlink.bright puts @@ -501,10 +503,13 @@ # end # # run_each(script, parser: parser, sigint_handler: sigint_handler) print"\a"; sleep 0.4 + Notifier.notify(image: "#{__dir__}/../../assets/images/deploy.png", + title: 'Deploy successful', + message: "Release #{release_tag} has been deployed to #{prod_app_name}") puts "\e[42m \e[0m \e[0;32mRelease \e[1m#{release_tag}\e[0;32m has been deployed to \e[1m#{prod_app_name}\e[0;32m\e[0m \e[42m \e[0m" print"\a"; sleep 0.4 puts print"\a"; sleep 0.4 @@ -1092,10 +1097,10 @@ def delete_branch(branch_name) return false unless branch_exists? branch_name begin return false if TTY::Prompt.new.no?("Delete branch #{branch_name}?") - rescue TTY::Reader::InputInterrupt + rescue TTY::Reader::InputInterrupt, TTY::Prompt::ConversionError return false end run_each <<-EOS.strip_heredoc :quiet # Delete branch #{branch_name}