Sha256: f20ec24529a3d94d7a0a8753bc239a0cba0f898296539900cad99a07e4894808
Contents?: true
Size: 767 Bytes
Versions: 9
Compression:
Stored size: 767 Bytes
Contents
#!/usr/bin/env ruby #start a new git branch with latest changes from master require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions.rb') include Socialcast tickets = tickets_from_arguments ARGV raise "JIRA ticket id is required to run this process" unless tickets.any? repo = Grit::Repo.new(Dir.pwd) remote_branches = repo.remotes.collect {|b| b.name.split('/').last } until branch_name = HighLine.ask("What would you like to name your branch?") {|q| q.validate = Proc.new { |branch| branch =~ /^[A-Za-z0-9\-_]+$/ && !remote_branches.include?(branch) } } end run_cmd 'git checkout master' run_cmd 'git pull' run_cmd "git checkout -b #{branch_name}" update_tickets tickets, :branch => branch_name start_tickets tickets
Version data entries
9 entries across 9 versions & 1 rubygems