Sha256: 8361d1eb87f9ba5d347ee76262ebaf73efdbaaf204bbbc79fcca4dba90dee142
Contents?: true
Size: 1.28 KB
Versions: 1
Compression:
Stored size: 1.28 KB
Contents
require 'git' module Semmy module Tasks class Branches < Base def define namespace 'branches' do task 'create_stable' do Shell.info("Creating stable branch #{stable_branch_name}.") git.branch(stable_branch_name).create end task 'push_master', [:remote] do |_, args| push_branch(args[:remote], 'master') end task 'push_previous_stable', [:remote] do |_, args| push_branch(args[:remote], previous_stable_branch_name) end end end private def stable_branch_name VersionString.stable_branch_name(Project.version, config.stable_branch_name) end def previous_stable_branch_name VersionString.previous_stable_branch_name(Project.version, config.stable_branch_name) end def push_branch(remote, name) remote ||= 'origin' if config.push_branches_after_release Shell.info("Pushing #{name} to #{remote}.") git.push(remote, name) else Shell.info("NOTE: Remember to push #{name} to #{remote}.") end end def git Git.open('.') end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
semmy-1.2.0 | lib/semmy/tasks/branches.rb |