Browse files

Change ls options from -xt to -xr, which fixes nondeterministic rollb…

…ack behavior when our releases are named 20110404210241 (YYYYMMDDHHMMSS) but our modification times are unreliable (apparently because of rsync). Best thing would be to have the ls options be user-settable.
  • Loading branch information...
1 parent 1ff5f3e commit f10e32390d5fa7a781361d344d006aaf6ce51d78 @randomcamel committed Apr 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/railsless-deploy.rb
View
2 lib/railsless-deploy.rb
@@ -51,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 -xr #{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 f10e323

Please sign in to comment.