bin/incr in incr-0.3.0 vs bin/incr in incr-0.4.0
- old
+ new
@@ -8,10 +8,13 @@
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'
+
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
@@ -20,19 +23,19 @@
# 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)
+ 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)
+ mix = Incr::Command::Mix.new(args, global_options)
mix.execute
end
end
exit(run(ARGV))