Sha256: 18ca4f3b832542b6f1e22346aaaffd9b10526913ab26d33b2289b49fc9b8479c

Contents?: true

Size: 709 Bytes

Versions: 1

Compression:

Stored size: 709 Bytes

Contents

#!/usr/bin/env ruby

# Show usage message and exit
def usage
  puts "Usage:
    #{__FILE__} [bump] Commit message goes here"
  exit 1
end

usage if ARGV.empty?

# If first Arg is a number, it indicates version bump
bump = ARGV[0].to_i > 0 ? ARGV.shift.to_i : 0 
message = ARGV.empty? ? 'Commit' : ARGV.join(' ')
message += " #{Time.now.to_s[0..-6]}"

puts "Committing (versionup =#{bump}) with message: #{message}"

system %Q[git add --all]
system %Q[git commit -a -m "#{message}" --author arvicco]
case bump
  when 1..9
	system %Q[rake version:bump:patch]
  when 10..99
	system %Q[rake version:bump:minor]
  when 10..99
	system %Q[rake version:bump:major]
end	
system %Q[git push]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
my_scripts-0.0.3 bin/gitcp