update to use better command recognition

This commit is contained in:
2017-07-27 14:20:56 +02:00
parent 1c0331524d
commit a8571827b9
14 changed files with 98 additions and 82 deletions

View File

@ -20,9 +20,9 @@ let npmTest = async (): Promise<void> => {
await bash('npm test')
}
let testDocker = async (): Promise<Dockerfile[]> => {
let testDocker = async (argvArg): Promise<Dockerfile[]> => {
let modDocker = await npmciMods.modDocker.load()
return await modDocker.readDockerfiles()
return await modDocker.readDockerfiles(argvArg)
.then(modDocker.pullDockerfileImages)
.then(modDocker.testDockerfiles)
}
@ -31,12 +31,13 @@ let testDocker = async (): Promise<Dockerfile[]> => {
* the main test function
* @param versionArg
*/
export let test = async (versionArg): Promise<void> => {
if (versionArg === 'docker') {
await testDocker()
export let test = async (argvArg): Promise<void> => {
let whatToTest = argvArg._[1]
if (whatToTest === 'docker') {
await testDocker(argvArg)
} else {
let modInstall = await npmciMods.modInstall.load()
await modInstall.install(versionArg)
await modInstall.install(whatToTest)
.then(npmDependencies)
.then(npmTest)
}