Skip to content

Commit

Permalink
Allow building with multiple Ruby patchlevels.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonforums committed Feb 26, 2011
1 parent 4c98930 commit 8690c31
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tasks/build.rb
@@ -1,12 +1,14 @@
@ruby_version = "1.8.7"
@ruby_patchlevel = 330
@ruby_patchlevel = [330, 334]

def correct_version?
@ruby_version == RUBY_VERSION &&
@ruby_patchlevel == RUBY_PATCHLEVEL
@ruby_patchlevel.any? { |p| p == RUBY_PATCHLEVEL }
end

abort "You can only build pik with ruby-1.8.7-p330" unless correct_version?
unless correct_version?
abort "You can only build pik with ruby-1.8.7-p{%s}" % @ruby_patchlevel.join(',')
end

EXE_VERSION = {
'version' => {
Expand Down Expand Up @@ -69,4 +71,4 @@ def correct_version?
task :rebuild, :needs => [
:clobber_exy, :build]
desc "reinstalls executable"
task :reinstall, :needs => [:clobber_exy, :install]
task :reinstall, :needs => [:clobber_exy, :install]

0 comments on commit 8690c31

Please sign in to comment.