grunt.registerMultiTask('executerepotagging', 'tag a repository', function() {
var done = this.async();
executerepotagging = grunt.util.spawn({
cmd: "hg",
args: ["tag",
"-u build",
"v" + global['version']]
}, function(error, result, code) {
if(code == 127) {
return grunt.warn(
'The attempt to push a tag failed. '
);
}
done(error);
});
executerepotagging.stdout.pipe(process.stdout);
executerepotagging.stderr.pipe(process.stderr);
executerepotagging = grunt.util.spawn({
cmd: "hg",
args: ["push"]
}, function(error, result, code) {
if(code == 127) {
return grunt.warn(
'The attempt to push a tag failed. '
);
}
done(error);
});
executerepotagging.stdout.pipe(process.stdout);
executerepotagging.stderr.pipe(process.stderr);
});
grunt.registerTask('tagrepo', 'executerepotagging');
"Up top" inside grunt.initConfig({ is:
executerepotagging: {
main: {
src: [],
dest: 'tagrepo',
options: {}
}
},
If you run this locally from the command line you will likely be prompted for a username and password when attempting the push. Clearly, this will not do in an automated process. The request for a username and a password will act link a kink in a hose and sabotage the push.
No comments:
Post a Comment