lib/demonz/base.rb in capistrano-demonz-0.0.15 vs lib/demonz/base.rb in capistrano-demonz-0.0.16
- old
+ new
@@ -125,10 +125,10 @@
Overridden to set/reset file and directory permissions
DESC
task :cleanup, :except => { :no_release => true } do
count = fetch(:keep_releases, 5).to_i
- local_releases = get_release_history(release_file).split.reverse
+ local_releases = get_release_history(release_file).split
if count >= local_releases.length
logger.important "no old releases to clean up"
else
logger.info "keeping #{count} of #{local_releases.length} deployed releases"
set :cleanup_releases, (local_releases - local_releases.last(count))