Skip to content

Commit

Permalink
Merge pull request msonnabaum#10 from patcon/msonnabaum-GH-10
Browse files Browse the repository at this point in the history
Fixes PEAR upgrade "Opa!" and idempotency issue
  • Loading branch information
msonnabaum committed Aug 14, 2012
2 parents c7d7f34 + 28d9d06 commit aef400a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.rdoc
Expand Up @@ -33,7 +33,7 @@ Install drush via Git from source repository.

== upgrade_pear:

Upgrades PEAR to minimum required by drush via PEAR.
Upgrades PEAR to v1.9.1, which meets minimum required by drush via PEAR.

== install_console_table:

Expand Down
11 changes: 7 additions & 4 deletions recipes/upgrade_pear.rb
Expand Up @@ -17,9 +17,12 @@
# limitations under the License.
#

# Upgrade PEAR if current version is < 1.9.1
cur_version = `pear -V 2>&1 | head -1 | awk '{print $NF}' | tr -d '\n'`
php_pear "pear" do
# Drush PEAR channel requires >= 1.9.1 due to hosting
# on GitHub, where PEAR repo uses CNAME record.

# Chef resources need unique names in case in run_list twice.
php_pear "PEAR-drush" do
package_name "PEAR"
version "1.9.1"
action :upgrade
not_if { Gem::Version.new(cur_version) > Gem::Version.new('1.9.0') }
end

0 comments on commit aef400a

Please sign in to comment.