Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 361d45e086 | |||
| cb7cb852ea | |||
| 61720f47be | |||
| b435fc6bdf | |||
| 70ad41ab86 | |||
| d67109b4bc | |||
| a29e04f9e3 | |||
| 9634ca3b4d | |||
| d2e7488868 |
46
dist/npmci.build.docker.js
vendored
46
dist/npmci.build.docker.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmci",
|
"name": "npmci",
|
||||||
"version": "2.1.20",
|
"version": "2.1.24",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"shelljs": "^0.7.0",
|
"shelljs": "^0.7.0",
|
||||||
"smartfile": "^3.0.10",
|
"smartfile": "^3.0.10",
|
||||||
"smartssh": "^1.0.5",
|
"smartssh": "^1.0.5",
|
||||||
"smartstring": "^2.0.4",
|
"smartstring": "^2.0.6",
|
||||||
"through2": "^2.0.1",
|
"through2": "^2.0.1",
|
||||||
"typings-global": "^1.0.3"
|
"typings-global": "^1.0.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,36 +29,23 @@ let readDockerfiles = function(){
|
|||||||
|
|
||||||
let sortDockerfiles = function(){
|
let sortDockerfiles = function(){
|
||||||
let done = plugins.q.defer();
|
let done = plugins.q.defer();
|
||||||
let redoSort:boolean;
|
NpmciEnv.dockerFiles.sort(function(a,b){
|
||||||
let sortCounter:number = 0;
|
let cleanTags = [];
|
||||||
let sortFunction = function(){
|
NpmciEnv.dockerFiles.forEach(function(dockerfileArg){
|
||||||
redoSort = false;
|
cleanTags.push(dockerfileArg.cleanTag);
|
||||||
let notYetBuiltImages:string[] = [];
|
|
||||||
NpmciEnv.dockerFiles.forEach((dockerFileArg)=>{
|
|
||||||
notYetBuiltImages.push(dockerFileArg.cleanTag);
|
|
||||||
});
|
});
|
||||||
NpmciEnv.dockerFiles.sort(function(a,b){
|
let aIndex = cleanTags.indexOf(a.cleanTag);
|
||||||
console.log("iteration: " + sortCounter.toString());
|
let bIndex = cleanTags.indexOf(b.baseImage);
|
||||||
console.log(notYetBuiltImages)
|
console.log(cleanTags);
|
||||||
console.log(a.cleanTag);
|
console.log(a.cleanTag);
|
||||||
let aIndex = notYetBuiltImages.indexOf(a.cleanTag);
|
console.log(b.cleanTag);
|
||||||
if(aIndex != -1){notYetBuiltImages.splice(aIndex,1)}
|
if(bIndex < aIndex && bIndex != -1){
|
||||||
console.log(notYetBuiltImages);
|
return -1;
|
||||||
if(notYetBuiltImages.indexOf(b.cleanTag) != -1){
|
|
||||||
redoSort = true;
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if(redoSort && sortCounter <= 50){
|
|
||||||
sortCounter++;
|
|
||||||
sortFunction();
|
|
||||||
} else {
|
} else {
|
||||||
done.resolve();
|
return 0
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
sortFunction();
|
done.resolve();
|
||||||
return done.promise;
|
return done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user