Last active
August 29, 2015 14:23
-
-
Save strzibny/82c8c6e1608e1e40bea0 to your computer and use it in GitHub Desktop.
gem-compare rake task example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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