Created
April 11, 2012 23:06
-
-
Save patcon/2363364 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[Thu, 12 Apr 2012 10:13:03 -0700] INFO: Processing ruby_block[check_pear_version] action create (drush::upgrade_pear line 25) | |
[Thu, 12 Apr 2012 10:13:03 -0700] INFO: ruby_block[check_pear_version] called | |
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: Processing log[original_pear_version: ] action write (drush::upgrade_pear line 35) | |
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: original_pear_version: | |
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: Processing log[declared_pear_version: 1.9.4] action write (drush::upgrade_pear line 34) | |
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: declared_pear_version: 1.9.4 | |
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: Processing php_pear[PEAR] action install (drush::upgrade_pear line 37) |
This file contains hidden or 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
original_pear_version = nil | |
ruby_block "check_pear_version" do | |
block do | |
original_pear_version = %x[ pear -V 2>&1 ].match(/PEAR.*(\d+\.\d+\.\d+)/)[1] | |
original_pear_version = Gem::Version.create(original_pear_version) | |
end | |
end | |
declared_pear_version = Gem::Version.create("1.6.1") | |
log "original_pear_version: #{original_pear_version}" | |
log "declared_pear_version: #{declared_pear_version}" | |
php_pear "PEAR" do | |
version declared_pear_version.to_s | |
options "--force" | |
action :install | |
only_if { original_pear_version != declared_pear_version } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@yfeldblum any quick thoughts on this behaviour?
original_pear_version
doesn't seem to make it outside the resource