Reputation: 26319
I'm trying to use the Grunt WP Deploy plugin to deploy my git-based WordPress plugin to the WordPress.org SVN repo.
I believe this is the relevant part of the task's JS:
//Add all new files that are not set to be ignored
cmd = "cd "+svnpath+"/trunk; pwd;";
cmd += "svn status | grep -v '^.[ \t]*\\..*' | grep '^?' | awk '{print $2}' | xargs svn add;"; //Add new files
cmd += "svn status | grep -v '^.[ \t]*\\..*' | grep '^!' | awk '{print $2}' | xargs svn delete;"; //Remove missing files
cmd = exec(cmd,{}, function( a, b, c ){
//Commit to trunk
grunt.log.writeln( 'Committing to trunk');
var cmd = exec( 'cd '+svnpath+'/trunk\n svn commit --username="'+svnuser+'" -m "'+commitmsg+'"',{}, function(error, stdout, stderr) {
if (error !== null) {
grunt.fail.warn( 'Failed to commit to trunk: ' + error );
}
//Copy to tag
grunt.log.writeln( 'Copying to tag');
var cmd = exec( "cd "+svnpath+"\n svn copy trunk/ tags/"+new_version, {}, function( error, stdout, stderr) {
if (error !== null) {
grunt.fail.warn( 'Failed to copy to tag: ' + error );
}
//Commit tag
grunt.log.writeln( 'Committing tag');
var cmd = exec( 'cd '+svnpath+'/tags/'+new_version+'\n svn commit --username="'+svnuser+'" -m "'+commitmsg+'"', {}, function( error, stdout, stderr) {
if (error !== null) {
grunt.fail.warn( 'Failed to comitt tag: ' + error );
}
done();
});
});
} );
I'm using Windows7 and Console2. When I run this task I consistently get the final "Failed to comitt tag" with the error message saying that tag does not exist.
I've been digging around and for me it seems to fail at the "copy tag" step as when I look at the actual folders, the new tag folder is never created. svn copy
isn't creating a new tags/X folder. Despite this it doesn't kick back any error. On the command-line I usually have to mkdir
and then svn add
the new directory (or svn mkdir
).
At first I thought it was a Windows vs Mac problem, I've spoken to the plugin author and he is also on Windows and the plugin obviously works for him. So I am at a loss for reasons that svn copy
doesn't copy and doesn't show any errors for failing to copy. I've also tried adding svn mkdir
into the exec line and that won't create the folder either.
Upvotes: 0
Views: 109
Reputation: 66
@helgatheviking I am also the victim of this error and have shifted to https://github.com/remcotolsma/grunt-rt-wp-deploy . I haven't check the script but found working but you can't upload banners and screenshot as they are not uploaded to assets :)
Upvotes: 1