opscode/omnibus-chef — pull request #233 by schisamo (2014-09-06 21:06:02+00:00)
Title: Ensure results of `Dir.glob` are sorted

__TL;DR__ - This will ensure the `*.dmg` files are _always_ preferred for final publishing on Mac OS X.

__Longer explanation__ - I noticed that on Mac OS X the Chef 11.16.0-rc.2 release published the `*.pkg` files instead of `*.dmg` files. After doing some digging this has happened numerous times in the past also. The culprit appears to be the default sorting applied to the results from a `Dir.glob`. This default sorting is [determined by the underlying operating system](https://bugs.ruby-lang.org/issues/8709). On Linux no sorting is applied so sometimes the `*.dmg` file comes first and others the `*.pkg` file comes first. Since [we use an `Array#find`](https://github.com/opscode/omnibus-chef/blob/c39c478753b9cc30aee10b1b045dffa7554c70e0/jenkins/release.rb#L91) to ultimately determine which package is published for a particular platform, only the first package in the list is taken into account.

This change will need to be ported to all `release/*` branches also.

/cc @opscode/release-engineers @opscode/client-engineers