Permalink
Switch branches/tags
production_RELEASE_RELEASE_CANDIDATE_STABLE_34 production_RELEASE_RELEASE_CANDIDATE_STABLE_32 production_RELEASE_RELEASE_CANDIDATE_STABLE_31 production_RELEASE_RELEASE_CANDIDATE_STABLE_30 production_RELEASE_RELEASE_CANDIDATE_STABLE_28 production_RELEASE_RELEASE_CANDIDATE_STABLE_27 production_RELEASE_RELEASE_CANDIDATE_STABLE_26 production_RELEASE_RELEASE_CANDIDATE_STABLE_25 production_RELEASE_RELEASE_CANDIDATE_STABLE_24 production_RELEASE_RELEASE_CANDIDATE_STABLE_23 production_RELEASE_RELEASE_CANDIDATE_STABLE_22 production_RELEASE_RELEASE_CANDIDATE_STABLE_21 production_RELEASE_RELEASE_CANDIDATE_STABLE_20 production_RELEASE_RELEASE_CANDIDATE_STABLE_19 production_RELEASE_RELEASE_CANDIDATE_STABLE_18 production_RELEASE_RELEASE_CANDIDATE_STABLE_17 production_RELEASE_RELEASE_CANDIDATE_STABLE_16 production_RELEASE_RELEASE_CANDIDATE_STABLE_15 production_RELEASE_RELEASE_CANDIDATE_STABLE_14 production_RELEASE_RELEASE_CANDIDATE_STABLE_13 production_RELEASE_RELEASE_CANDIDATE_STABLE_12 production_RELEASE_RELEASE_CANDIDATE_STABLE_11 production_RELEASE_RELEASE_CANDIDATE_STABLE_10 production_RELEASE_RELEASE_CANDIDATE_STABLE_8 production_RELEASE_RELEASE_CANDIDATE_STABLE_6 production_RELEASE_RELEASE_CANDIDATE_STABLE_5 production_RELEASE_RELEASE_CANDIDATE_STABLE_2 production_RELEASE_RELEASE_CANDIDATE_BETA_1 production_RELEASE_DEV_597 production_RELEASE_DEV_596 production_RELEASE_DEV_595 production_RELEASE_DEV_594 production_RELEASE_DEV_593 production_RELEASE_DEV_592 production_RELEASE_DEV_591 production_RELEASE_DEV_590 production_RELEASE_DEV_589 production_RELEASE_DEV_588 production_RELEASE_DEV_587 production_RELEASE_DEV_586 production_RELEASE_DEV_585 production_RELEASE_DEV_584 production_RELEASE_DEV_583 production_RELEASE_DEV_582 production_RELEASE_DEV_581 production_RELEASE_DEV_580 production_RELEASE_DEV_579 production_RELEASE_DEV_578 production_RELEASE_DEV_577 production_RELEASE_DEV_576 production_RELEASE_DEV_575 production_RELEASE_DEV_574 production_RELEASE_DEV_573 production_RELEASE_DEV_572 production_RELEASE_DEV_571 production_RELEASE_DEV_570 production_RELEASE_DEV_569 production_RELEASE_DEV_568 production_RELEASE_DEV_567 production_RELEASE_DEV_566 production_RELEASE_DEV_565 production_RELEASE_DEV_564 production_RELEASE_DEV_563 production_RELEASE_DEV_562 production_RELEASE_DEV_561 production_RELEASE_DEV_560 production_RELEASE_DEV_559 production_RELEASE_DEV_558 production_RELEASE_DEV_557 production_RELEASE_DEV_556 production_RELEASE_DEV_555 production_RELEASE_DEV_554 production_RELEASE_DEV_553 production_RELEASE_DEV_552 production_RELEASE_DEV_551 production_RELEASE_DEV_550 production_RELEASE_DEV_549 production_RELEASE_DEV_548 production_RELEASE_DEV_547 production_RELEASE_DEV_546 production_RELEASE_DEV_545 production_RELEASE_DEV_544 production_RELEASE_DEV_543 production_RELEASE_DEV_542 production_RELEASE_DEV_541 production_RELEASE_DEV_540 production_RELEASE_DEV_539 production_RELEASE_DEV_538 production_RELEASE_DEV_537 production_RELEASE_DEV_536 production_RELEASE_DEV_535 production_RELEASE_DEV_534 production_RELEASE_DEV_533 production_RELEASE_DEV_532 production_RELEASE_DEV_531 production_RELEASE_DEV_530 production_RELEASE_DEV_529 production_RELEASE_DEV_528 production_RELEASE_DEV_527 production_RELEASE_DEV_526
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (63 sloc) 1.33 KB
meta :task do
accepts_block_for :run
template {
met? { @run_called }
meet {
call_task(:run)
@run_called = true
}
}
end
dep 'deploy repo up to date' do
setup {
set :repo_path, '.'
}
requires [
'branch name',
'clean.repo',
'branch exists.repo',
'branch checked out.repo',
'HEAD up to date.repo',
'submodules up to date.task',
'cached JS and CSS removed',
'app bundled',
'app flagged for restart.task'
]
end
dep 'branch name' do
end
meta :repo do
def repo
@repo ||= Babushka::GitRepo.new(var(:repo_path))
end
end
dep 'clean.repo' do
met? { repo.clean? }
end
dep 'branch exists.repo' do
met? { repo.branches.include? var(:branch) }
meet { repo.branch! var(:branch) }
end
dep 'branch checked out.repo' do
met? { repo.current_branch == var(:branch) }
meet { repo.checkout! var(:branch) }
end
dep 'HEAD up to date.repo' do
met? { repo.current_head == var(:new_id) }
meet { repo.reset_hard! var(:new_id) }
end
dep 'submodules up to date.task' do
run {
shell "git submodule update --init"
}
end
dep 'cached JS and CSS removed' do
meet {
shell "rm -f public/javascripts/all.js"
shell "rm -f public/stylesheets/all.css"
}
end
dep 'app flagged for restart.task' do
before { shell 'mkdir -p tmp' }
run { shell 'touch tmp/restart.txt' }
end