Skip to content

Commit

Permalink
Resolved conflicts from newest promise and test updates
Browse files Browse the repository at this point in the history
* master:
  Update dependencies with test fixes
  Fix grunt task run fail handling

# Conflicts:
#	Gruntfile.js
#	tasks/grunt-release.js
  • Loading branch information
sunyatasattva committed Jun 6, 2016
2 parents 1e3991b + 0dd2144 commit 181dba3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 36 deletions.
20 changes: 10 additions & 10 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ module.exports = function(grunt) {
file: 'test/fixtures/_component.json',
changelog: 'test/fixtures/_CHANGELOG.md',
additionalFiles: ['test/fixtures/_bower.json'],
changelogText: '### <%= version %>\n',
commitMessage: 'v<%= version %>',
changelogText: grunt.template.process('### <%= version %>\n', {data: {'version': '0.0.13'}}),
commitMessage: grunt.template.process('v<%= version %>', {data: {'version': '0.0.13'}}),
beforeRelease: ['dummyBefore', { name: 'dummyBefore', preserveFlags: true }]
}
},
Expand Down Expand Up @@ -79,25 +79,25 @@ module.exports = function(grunt) {
setup: {
test: {
files: [{
src: 'test/fixtures/component.json',
from: 'test/fixtures/component.json',
dest: 'test/fixtures/_component.json'
},{
src: 'test/fixtures/bower.json',
from: 'test/fixtures/bower.json',
dest: 'test/fixtures/_bower.json'
},{
src: 'test/fixtures/CHANGELOG.md',
from: 'test/fixtures/CHANGELOG.md',
dest: 'test/fixtures/_CHANGELOG.md'
},{
src: 'test/fixtures/bower.json',
from: 'test/fixtures/bower.json',
dest: 'test/fixtures/_bower-absolute.json'
},{
src: 'test/fixtures/component.json',
from: 'test/fixtures/component.json',
dest: 'test/fixtures/_component-patch.json'
},{
src: 'test/fixtures/component.json',
from: 'test/fixtures/component.json',
dest: 'test/fixtures/_component-minor.json'
},{
src: 'test/fixtures/component.json',
from: 'test/fixtures/component.json',
dest: 'test/fixtures/_component-major.json'
}]
}
Expand Down Expand Up @@ -130,7 +130,7 @@ module.exports = function(grunt) {

grunt.registerMultiTask('setup', 'Setup test fixtures', function(){
this.files.forEach(function(f){
grunt.file.copy(f.src, f.dest);
grunt.file.copy(f.from, f.dest);
});
});

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"author": "Dave Geddes",
"license": "MIT",
"dependencies": {
"shelljs": "^0.5.1",
"semver": "^4.3.6",
"superagent": "^1.2.0",
"shelljs": "^0.7.0",
"semver": "^5.1.0",
"superagent": "^1.8.3",
"q": "^1.4.1"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-nodeunit": "^0.4.1",
"grunt-contrib-clean": "^0.6.0"
"grunt": "^1.0.1",
"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-clean": "^1.0.0"
},
"peerDependencies": {
"grunt": ">=0.4.0"
"grunt": ">=1.0.1"
}
}
37 changes: 18 additions & 19 deletions tasks/grunt-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,34 +305,33 @@ module.exports = function(grunt) {

function runTasks(taskName) {
var tasks = options[taskName];
var promises = [];
var flags = grunt.option.flags().join(' ');
var msg;

var fn = function() {
return Q.fcall(function() {
if (tasks.length) {
grunt.log.ok('running ' + taskName + ' ');
if (Array.isArray(tasks) && tasks.length) {
grunt.log.ok('running ' + taskName + ' ');

if(flags.length) {
grunt.log.ok('-> current flags: ' + flags);
}
if(flags.length) {
grunt.log.ok('-> current flags: ' + flags);
}

if (!nowrite) {
for (var i = 0; i < tasks.length; i++) {
if(typeof tasks[i] === 'string' || !tasks[i].preserveFlags){
msg = '-> ' + tasks[i] + (flags.length ? ' (ignoring current flags)' : '');
run('grunt ' + tasks[i], msg);
}
else if (tasks[i].preserveFlags){
run('grunt ' + tasks[i].name + ' ' + flags, '-> ' + tasks[i].name + ' ' + flags);
}
if (!nowrite) {
for (var i = 0; i < tasks.length; i++) {
for (var i = 0; i < tasks.length; i++) {
if(typeof tasks[i] === 'string' || !tasks[i].preserveFlags){
msg = '-> ' + tasks[i] + (flags.length ? ' (ignoring current flags)' : '');
promises.push(run('grunt ' + tasks[i], msg));
}
else if (tasks[i].preserveFlags){
promises.push(run('grunt ' + tasks[i].name + ' ' + flags, '-> ' + tasks[i].name + ' ' + flags));
}
}
}
});
};
}
}

return fn;
return Q.all(promises);
}

new Q()
Expand Down

0 comments on commit 181dba3

Please sign in to comment.