Skip to content

Commit

Permalink
Merge pull request #11 from dtJuiceMobile/master
Browse files Browse the repository at this point in the history
Please consider merging this code
  • Loading branch information
sghill committed Jan 12, 2016
2 parents 2bbd432 + 4e542b9 commit d52df13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 11 additions & 1 deletion tasks/fileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d52df13

Please sign in to comment.