#!/usr/bin/env node
'use strict';

var multiline = require('multiline'),
	program = require('commander'),
	bump = require('./index').bump;

program
	.version(require('./package').version)
	.usage('[options]')
	.option('--no-tags', 'Do not create git tag');

['patch', 'minor', 'major'].forEach(function(type){
	program.option('--' + type, 'Increase ' + type + ' version');

	program.on(type, function(){
		setTimeout(function(){
			bump(type, {
				tags: program.tags
			});
		}, 0);
	});
});

program.on('--help', function(){
	console.log(multiline(function(){/*
  Usage:

    $ bump --patch
    $ bump --patch --no-tags
    $ bump --info
	*/}));
});

program.parse(process.argv);

if(program.rawArgs.length < 3){
	program.help();
}


@@ -133,16 +133,18 @@
 .bump;%0A%0A
+%0A%0A
 program%0A
@@ -250,16 +250,58 @@
 it tag')
+%0A%09.option('--push', 'Push to remote repo')
 ;%0A%0A%5B'pat
@@ -504,16 +504,40 @@
 ram.tags
+,%0A%09%09%09%09push: program.push
 %0A%09%09%09%7D);%0A

add push option