Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task(name, shellCommand) & alias(name, alias) #50

Closed
jelte opened this issue Aug 7, 2014 · 5 comments
Closed

task(name, shellCommand) & alias(name, alias) #50

jelte opened this issue Aug 7, 2014 · 5 comments

Comments

@jelte
Copy link
Contributor

jelte commented Aug 7, 2014

Possible to run simple shell commands directly without creating callback.

task(name, shellCommand)

example:
task('deploy:cache:warmup','php %releasepath%/app/console assetic:dump --env=%env% --no-debug')

This would automatically provide some default behaviour for a task, and could replace many simple tasks.

The current functionality for ReferenceTask could be removed to an alias function

function alias($name, $alias) {
    Deployer::$tasks[$name] = new ReferenceTask(Deployer::$tasks[$alias]);
}
@jelte jelte changed the title task(name, shellCommand) & alias(name, alias) task(name, shellCommand) Aug 7, 2014
@jelte jelte changed the title task(name, shellCommand) task(name, shellCommand) & alias(name, alias) Aug 7, 2014
@antonmedv
Copy link
Member

I think it's bad decision, because may be unfamiliar to users. And this is also make incompatible API changes.

@jelte
Copy link
Contributor Author

jelte commented Aug 7, 2014

That's true, but we could handle this by checking if the shellCommand is the name of a Task, if it is the alias function will be called.

I think it will be extremely rare a taskname matches something you wish to execute on the server.
It is something that should be considered if you want to have Deployer configured by YAML files.

@antonmedv
Copy link
Member

I do not think this is good solution.

@Mihailoff
Copy link
Contributor

I don't see big difference between what is already exists

task('deploy:cache:warmup','php %releasepath%/app/console assetic:dump --env=%env% --no-debug')
task('deploy:cache:warmup',function(){ run('php %releasepath%/app/console assetic:dump --env=%env% --no-debug')); });

@antonmedv
Copy link
Member

Closing this issue as non necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants