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

Warning: Task "wordpressdeploy" not found. Use --force to continue. #16

Open
eriteric opened this issue Jun 3, 2014 · 3 comments
Open

Comments

@eriteric
Copy link

eriteric commented Jun 3, 2014

Can't get past this error. The syntax in the gruntfile is correct. Do I need to install rsync locally?

@brian-slate
Copy link

Posted the same issue. I just created a new task that uses the wordpressdeploy built-in tasks like so:

grunt.registerTask('deploy', 'Deploy to server environment', function(target) {
grunt.option('target', target)
grunt.task.run('push_files');
grunt.task.run('push_db');
}
);

You'd run this like "grunt deploy:staging" (provided you have a staging configuration setup in your gruntfile).

@davidthou
Copy link
Collaborator

@unknpwn Thank you for your contribution, I think this should be useful for other and added in README.md file.

@davidthou davidthou mentioned this issue Jun 16, 2014
@Grawl
Copy link

Grawl commented Nov 17, 2014

If you have problems with jit-grunt you have to add static mappings:

require('jit-grunt')(grunt, {
    // translate wordpressdeploy tasks to use the 'grunt-wordpress-deploy' plugin
    push_files: 'grunt-wordpress-deploy',
    push_db: 'grunt-wordpress-deploy',
    pull_files: 'grunt-wordpress-deploy',
    pull_db: 'grunt-wordpress-deploy'
});

And then you will can use all built-in grunt-wordpress-deploy tasks like so:

$ grunt push_files:staging`

Also you can wrap all needed tasks into multitask function to do more than one step:

grunt.registerTask(
    'deploy',
    'Grab deploy info; If valid, then deploy to target environment server',
    function(target){
    grunt.option('target',target);
    if(target!==''){
        grunt.task.run('push_db:'+target);
        grunt.task.run('push_files:'+target);
    }
    else{
        grunt.log.error('Please provide a target for deployment! It is dangerous to deploy with closed eyes.');
    }
});

And do this:

$ grunt deploy:staging

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

4 participants