diff --git a/package.json b/package.json index 4e9bf2f..daeba00 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-jenkins", "description": "Manage Jenkins with Grunt", - "version": "0.5.0", + "version": "0.5.1", "homepage": "http://documentup.com/sghill/grunt-jenkins", "author": { "name": "sghill", @@ -30,11 +30,12 @@ }, "devDependencies": { "grunt": "~0.4.5", + "grunt-cli": "~0.1.13", "grunt-contrib-jshint": "~0.10.0", - "should": "~4.0.4", - "mocha": "~1.20.1", "grunt-mocha-test": "~0.11.0", - "grunt-cli": "~0.1.13" + "mocha": "~1.20.1", + "q": "^0.8.9", + "should": "~4.0.4" }, "dependencies": { "request": "~2.36.0", diff --git a/tasks/fileSystem.js b/tasks/fileSystem.js index d58aa6d..5a179a2 100644 --- a/tasks/fileSystem.js +++ b/tasks/fileSystem.js @@ -20,7 +20,17 @@ function FileSystem(pipelineDirectory, grunt) { fs.readdir(pipelineDirectory, function(e, contents) { if(e) { return deferred.reject(e); } // assumption: we don't have periods in our job names - var directories = _.reject(contents, withDot); + // by DT: this was causing jobs with version numbers in them to not be loaded into the destination jenkins. + // var directories = _.reject(contents, withDot); + //deferred.resolve(directories); + //replacing with this loop: + var directories =[]; + + for(var file in contents){ + if(fs.lstatSync([pipelineDirectory,contents[file]].join('/')).isDirectory()){ + directories.push(contents[file]); + } + } deferred.resolve(directories); }); return deferred.promise;