Sha256: 2a2f0590743e488b9b5e53282131c99a4b8daeee13c0e7a75b90d525486c9c8a
Contents?: true
Size: 978 Bytes
Versions: 10
Compression:
Stored size: 978 Bytes
Contents
require 'rgitflow/tasks/task' module RGitFlow module Tasks class Hotfix class Finish < RGitFlow::Tasks::Task def initialize(git) super(git, 'finish', 'Finish a hotfix branch', ['rgitflow', 'hotfix']) end protected def run status 'Finishing hotfix branch...' branch = @git.current_branch unless branch.start_with? RGitFlow::Config.options[:hotfix] error 'Cannot finish a hotfix branch unless you are in a hotfix branch' abort end @git.branch(RGitFlow::Config.options[:master]).checkout @git.merge branch, "merging #{branch} into #{RGitFlow::Config.options[:master]}" @git.push if @git.is_remote_branch? branch @git.push('origin', branch, {:delete => true}) end @git.branch(branch).delete status "Finished hotfix branch #{branch}!" end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems