restructure a little bit

This commit is contained in:
2016-06-07 10:21:56 +02:00
parent f510277c16
commit eeef17c327
19 changed files with 27 additions and 24 deletions

View File

@ -170,12 +170,11 @@ export class Dockerfile {
bashBare("docker pull " + this.buildTag);
};
test(){
let testExists = plugins.smartfile.checks.fileExistsSync(
plugins.path.join(paths.NpmciProjectDir,("./test/test_" + this.version + ".sh"))
);
let testFile = plugins.path.join(paths.NpmciTestDir,"test_" + this.version + ".sh");
let testExists = plugins.smartfile.checks.fileExistsSync(testFile);
if(testExists){
bashBare("docker run -v " +
plugins.path.join(paths.NpmciProjectDir,"./test/") + ":/test/ " +
paths.NpmciTestDir + ":/test " +
"--name " + this.containerName + " " + this.buildTag + " /test/" + "test_" + this.version + ".sh");
} else {
plugins.beautylog.warn("skipping tests for " + this.cleanTag + " because no testfile was found!");

View File

@ -5,4 +5,5 @@ export let cwd = process.cwd();
export let NpmciPackageRoot = plugins.path.join(__dirname,"../");
export let NpmciPackageConfig = plugins.path.join(NpmciPackageRoot,"./config.json");
export let NpmciProjectDir = process.cwd();
export let NpmciProjectDir = cwd;
export let NpmciTestDir = plugins.path.join(cwd,"./test");