Skip to content

Instantly share code, notes, and snippets.

@strzibny
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strzibny/82c8c6e1608e1e40bea0 to your computer and use it in GitHub Desktop.
Save strzibny/82c8c6e1608e1e40bea0 to your computer and use it in GitHub Desktop.
gem-compare rake task example
# From Rakefile, expects :build task
task :clean do
`rm -rf pkg`
end
# Compare latest release with current git head
require 'rubygems/comparator'
task compare: [:clean, :build] do
git_version = VagrantPlugins::Registration::VERSION
options = {}
options[:output] = 'pkg'
options[:keep_all] = true
comparator = Gem::Comparator.new(options)
comparator.compare_versions('vagrant-registration', ['_', git_version])
comparator.print_results
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment