stephenharris / grunt-wp-deploy

Grunt plug-in to deploy a build directory to WordPress' SVN
MIT License
64 stars 18 forks source link

Ability to do a dry run #23

Closed siamkreative closed 8 years ago

siamkreative commented 8 years ago

Hi @stephenharris

Is there a way to do a dry run, by appending --dry-run to the task name for instance? I'm worried I'll mess up my live plugins.

Thanks

stephenharris commented 8 years ago

Sorry a reply was so long in coming.

It could render a diff, but I'm not sure how useful that would be since it could be a lot.

If you're just after a quick check before finally deploying, it does prompt you if you want to continue - and so you can manually inspect the /tmp/ directory for the SVN checkout and see its current state before checking-in.

I'll leave this issue in case you or anyone else wants to submit a PR for adding a dry-run option. If I get time I'll turn my attention to it, but I'm afraid it's really low priority for me at the moment. My next goal for this plug-in is to make it possible to quickly revert a botched release (i.e. major bug found after release, and running a task so the previous version is offered on wp.org).

rene-hermenau commented 8 years ago

@stephenharris This is a good hint. May i suggest to write this into the readme? This was the only thing which kept me away from firing the module immediately after installing it the first time.

stephenharris commented 8 years ago

Latest release includes the option of disabling the commit confirmation, so I've now added that option to the readme.

There's still scope for a 'dry-run' (perhaps lists the files that would be modified / added or updated), but I'm going to close this ticket now due to inactivity. As previously noted though, you are asked for confirmation before committing to the repo so you inspect what will be committed before doing so.