Permalink
Browse files

Altered the `ls` command used to list older releases, should fix #88

…for the majority of use cases; have documented the other options for people who need to customise this via the :release_name functionality.
  • Loading branch information...
1 parent 810f956 commit 92941e855d70a5778eb094a972fdf43c70802b95 @leehambley leehambley committed Dec 17, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/capistrano/recipes/deploy.rb
@@ -38,6 +38,7 @@ def _cset(name, *args, &block)
_cset(:strategy) { Capistrano::Deploy::Strategy.new(deploy_via, self) }
+# If overriding release name, please also select an appropriate setting for :releases below.
_cset(:release_name) { set :deploy_timestamped, true; Time.now.utc.strftime("%Y%m%d%H%M%S") }
_cset :version_dir, "releases"
@@ -50,7 +51,7 @@ def _cset(name, *args, &block)
_cset(:current_path) { File.join(deploy_to, current_dir) }
_cset(:release_path) { File.join(releases_path, release_name) }
-_cset(:releases) { capture("ls -xt #{releases_path}").split.reverse }
+_cset(:releases) { capture("ls -x #{releases_path}").split.reverse }
_cset(:current_release) { File.join(releases_path, releases.last) }
_cset(:previous_release) { releases.length > 1 ? File.join(releases_path, releases[-2]) : nil }

0 comments on commit 92941e8

Please sign in to comment.