Skip to content

Commit

Permalink
remove args from eg
Browse files Browse the repository at this point in the history
  • Loading branch information
shibayu36 committed Jul 1, 2013
1 parent 44919b7 commit 1a0528b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions eg/naoya.pl
Expand Up @@ -16,7 +16,7 @@


task deploy => { task deploy => {
setup => sub { setup => sub {
my ($host, @args) = @_; my ($host) = @_;
my $repository = get('repository'); my $repository = get('repository');
my $deploy_to = get('deploy_to'); my $deploy_to = get('deploy_to');
my $branch = 'origin/' . get('branch'); my $branch = 'origin/' . get('branch');
Expand All @@ -25,7 +25,7 @@
} $host; } $host;
}, },
update => sub { update => sub {
my ($host, @args) = @_; my ($host) = @_;
my $deploy_to = get('deploy_to'); my $deploy_to = get('deploy_to');
my $branch = 'origin/' . get('branch'); my $branch = 'origin/' . get('branch');
remote { remote {
Expand All @@ -36,25 +36,25 @@


task server => { task server => {
start => sub { start => sub {
my ($host, @args) = @_; my ($host) = @_;
remote { remote {
sudo "supervisorctl start myapp"; sudo "supervisorctl start myapp";
} $host; } $host;
}, },
stop => sub { stop => sub {
my ($host, @args) = @_; my ($host) = @_;
remote { remote {
sudo "supervisorctl stop myapp"; sudo "supervisorctl stop myapp";
} $host; } $host;
}, },
restart => sub { restart => sub {
my ($host, @args) = @_; my ($host) = @_;
remote { remote {
run "kill -HUP `cat /tmp/myapp.pid`"; run "kill -HUP `cat /tmp/myapp.pid`";
} $host; } $host;
}, },
status => sub { status => sub {
my ($host, @args) = @_; my ($host) = @_;
remote { remote {
sudo "supervisorctl status"; sudo "supervisorctl status";
} $host; } $host;
Expand All @@ -63,7 +63,7 @@


task carton => { task carton => {
install => sub { install => sub {
my ($host, @args) = @_; my ($host) = @_;
my $deploy_to = get('deploy_to'); my $deploy_to = get('deploy_to');
remote { remote {
run ". ~/perl5/perlbrew/etc/bashrc && cd $deploy_to && carton install"; run ". ~/perl5/perlbrew/etc/bashrc && cd $deploy_to && carton install";
Expand Down
6 changes: 3 additions & 3 deletions eg/simple.pl
Expand Up @@ -36,7 +36,7 @@


# Tasks # Tasks
task update => sub { task update => sub {
my ($host, @args) = @_; my ($host) = @_;


# Executed on localhost # Executed on localhost
run 'some', 'command'; run 'some', 'command';
Expand All @@ -51,7 +51,7 @@
# nest tasks # nest tasks
task server => { task server => {
setup => sub { setup => sub {
my ($host, @args) = @_; my ($host) = @_;


# Executed on localhost # Executed on localhost
run 'some', 'command'; run 'some', 'command';
Expand All @@ -67,7 +67,7 @@
}, },


restart => sub { restart => sub {
my ($host, @args) = @_; my ($host) = @_;
# ... # ...
}, },
}; };

0 comments on commit 1a0528b

Please sign in to comment.