restructure a little bit
This commit is contained in:
@ -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!");
|
||||
|
@ -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");
|
Reference in New Issue
Block a user