npmci/ts/mod_build/index.ts

26 lines
638 B
TypeScript
Raw Normal View History

2017-05-18 20:40:09 +00:00
import * as plugins from './mod.plugins'
import { bash } from '../npmci.bash'
import * as env from '../npmci.env'
import * as npmciMods from '../npmci.mods'
2016-06-02 13:39:03 +02:00
2016-09-04 16:05:47 +02:00
/**
* defines possible build services
*/
2017-03-07 18:07:03 +01:00
export type TBuildService = 'docker'
2016-09-04 16:05:47 +02:00
/**
* builds for a specific service
*/
export let build = async (argvArg): Promise<void> => {
let whatToPublish: string = argvArg._[1]
switch (whatToPublish) {
2017-03-07 18:07:03 +01:00
case 'docker':
2017-05-18 20:40:09 +00:00
let modDocker = await npmciMods.modDocker.load()
await modDocker.build(argvArg)
2017-03-07 18:07:03 +01:00
break
default:
plugins.beautylog.log('build target ' + whatToPublish + ' not recognised!')
}
2017-03-07 18:07:03 +01:00
return
2016-06-03 02:10:34 +02:00
}