mirror of
https://github.com/jimeh/skyhook.git
synced 2026-02-19 11:06:38 +00:00
initial import
This commit is contained in:
35
init/actions/update.rb
Normal file
35
init/actions/update.rb
Normal file
@@ -0,0 +1,35 @@
|
||||
class UpdateAction < Action
|
||||
|
||||
def default
|
||||
skyhook
|
||||
end
|
||||
|
||||
def all
|
||||
skyhook
|
||||
projects
|
||||
end
|
||||
|
||||
def method_missing(project, *args)
|
||||
Projects.send(project).checkout(*args)
|
||||
Action.perms :ensure
|
||||
end
|
||||
|
||||
def projects(*args)
|
||||
Projects.checkout(*args)
|
||||
Action.perms :ensure
|
||||
end
|
||||
|
||||
def skyhook
|
||||
SVN.up(nil, $skyhook_root)
|
||||
shell "#{$skyhook_root}/init/rc.rb update.post_skyhook"
|
||||
if $console
|
||||
exec "irb -r #{$skyhook_root}/init/init.rb"
|
||||
end
|
||||
end
|
||||
|
||||
def post_skyhook
|
||||
Action.perms :ensure
|
||||
Projects.init
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user