#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions.rb') require 'readline' include Socialcast branch = current_branch raise "Cannot release reserved branch" if %w{master staging}.include?(branch) tickets = assert_tickets_provided(ARGV, branch) exit unless Readline.readline("This will release #{branch} to production. Are you sure (y/n)? ") == 'y' run_cmd 'git update' integrate branch, 'master' update_tickets tickets, :branch => branch release_tickets tickets integrate branch, 'next_release' integrate branch, 'staging' run_cmd "grb rm #{branch}"