Sha256: 60c8de03a7ecfa9d51479a6fdbae6c27f5f04c4eeb7faf315f0107359f782015

Contents?: true

Size: 807 Bytes

Versions: 2

Compression:

Stored size: 807 Bytes

Contents

require 'git-cleanup'
require 'optparse'

trap("INT") {
  Formatador.redisplay("[bold][yellow]No more cleanup[/]\n")
  exit(1)
}

conf = {
	:skip_unmerged => false
}

opts = OptionParser.new do |opts|
	opts.banner = "Usage: git-cleanup [OPTIONS] -- ... commands"
	opts.on("-s", "--skip-unmerged", "Unmerged branches will be skipped") do |u|
		conf[:skip_unmerged] = true
	end
	opts.on("-o","--only FILTER", "Only branches that match FILTER will be included") do |only_filter|
		conf[:only_filter] = only_filter
	end
  opts.on("-v", "--version", "Shows version") do
    puts GitCleanup::VERSION
    exit
  end
	opts.on("-h", "--help", "Shows this help") do
    puts opts
    exit
  end
end

begin
  opts.parse!(ARGV)
rescue OptionParser::ParseError => ex
  $stderr.puts ex
  exit 1
end

GitCleanup.run(conf)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git-cleanup-0.2.2 bin/git-cleanup
git-cleanup-0.2.1 bin/git-cleanup