Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Expose an 'ls_opts' variable that users can set in deploy.rb.

  • Loading branch information...
commit f23bd3fc5e8355e3891827e9af4909858d9b13f1 1 parent f10e323
@randomcamel authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/railsless-deploy.rb
View
4 lib/railsless-deploy.rb
@@ -28,6 +28,8 @@ def _cset(name, *args, &block)
_cset(:deploy_to) { "/u/apps/#{application}" }
_cset(:revision) { source.head }
+_cset(:ls_opts) { "-xt" }
+
# =========================================================================
# These variables should NOT be changed unless you are very confident in
# what you are doing. Make sure you understand all the implications of your
@@ -51,7 +53,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 -xr #{releases_path}").split.reverse }
+ _cset(:releases) { capture("ls #{ls_opts} #{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 }
Please sign in to comment.
Something went wrong with that request. Please try again.