Sha256: 06d7d39b60337fd82351834f83d66733d361c032fc47ae1098d59f344c99b425
Contents?: true
Size: 1.26 KB
Versions: 4
Compression:
Stored size: 1.26 KB
Contents
#!/usr/bin/env ruby $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w(.. lib)) require 'incr' require 'gli' include GLI::App program_desc('Tasteful utility to increment the version number and create a corresponding git tag.') version(Incr::VERSION) flag [:d, :versionFileDirectory], :default_value => '.', :desc => 'Directory where to search for version file' flag [:t, :tagNamePattern], :default_value => 'v%s', :desc => 'Pattern for the tag name' switch :commit, :default_value => true, :desc => 'Commit changes' switch :tag, :default_value => true, :desc => 'Create a git tag' pre do |global, command, options, args| if args.length != 1 || !['major', 'minor', 'patch'].any? {|segment| args.include?(segment)} STDERR.puts('Expecting a single argument: major, minor or patch.') return false end true end # NPM Support desc('Increment the version of your NPM package.') command :npm do |cmd| cmd.action do |global_options, options, args| npm = Incr::Command::Npm.new(args, global_options) npm.execute end end # Elixir Support desc('Increment the version of your Mix package.') command :mix do |cmd| cmd.action do |global_options, options, args| mix = Incr::Command::Mix.new(args, global_options) mix.execute end end exit(run(ARGV))
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
incr-0.7.1 | bin/incr |
incr-0.7.0 | bin/incr |
incr-0.6.0 | bin/incr |
incr-0.5.0 | bin/incr |