Skip to content

Commit

Permalink
Features/tag push specificity
Browse files Browse the repository at this point in the history
Ref.: #55
  • Loading branch information
drublic committed Dec 2, 2014
1 parent 9e13911 commit 30add49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CHANGELOG

### HEAD

* Features/tag push specificity
* Add package.json/component.json name to templateData for messages.
* Add support for multiline commit messages
* Support renamed tasks
Expand Down
15 changes: 8 additions & 7 deletions tasks/grunt-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports = function(grunt){
tag: true,
push: true,
pushTags: true,
npm : true
npm : true,
remote: "origin"
}, grunt.config(this.name).options);

var config = setup(options.file, type);
Expand Down Expand Up @@ -82,7 +83,7 @@ module.exports = function(grunt){

function getNpmTag(){
var tag = grunt.option('npmtag') || options.npmtag;
if(tag === true) { tag = config.newVersion }
if(tag === true) { tag = config.newVersion; }
return tag;
}

Expand Down Expand Up @@ -134,11 +135,11 @@ module.exports = function(grunt){
}

function push(){
return run('git push', 'pushed to remote git repo');
run('git push ' + config.remote + ' HEAD', 'pushed to remote');
}

function pushTags(){
return run('git push --tags', 'pushed new tag '+ config.newVersion +' to remote git repo');
function pushTags(config){
run('git push ' + config.remote + ' ' + tagName, 'pushed new tag '+ config.newVersion +' to remote');
}

function publish(){
Expand All @@ -149,11 +150,11 @@ module.exports = function(grunt){
cmd += ' --tag ' + npmtag;
msg += ' with a tag of "' + npmtag + '"';
}
if (options.folder){ cmd += ' ' + options.folder }

if (options.folder){ cmd += ' ' + options.folder; }
return run(cmd, msg);
}


function bump(){
var i, l, file, pkg, promise;
var promises = [];
Expand Down

0 comments on commit 30add49

Please sign in to comment.