npmci/ts/mod_build/index.ts

26 lines
639 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 11:39:03 +00:00
2016-09-04 14:05:47 +00:00
/**
* defines possible build services
*/
2017-03-07 17:07:03 +00:00
export type TBuildService = 'docker'
2016-09-04 14:05:47 +00:00
/**
* builds for a specific service
*/
export let build = async (argvArg): Promise<void> => {
let whatToPublish: string = argvArg._[1]
switch (whatToPublish) {
2017-03-07 17:07:03 +00:00
case 'docker':
2017-05-18 20:40:09 +00:00
let modDocker = await npmciMods.modDocker.load()
await modDocker.build(argvArg)
2017-03-07 17:07:03 +00:00
break
default:
plugins.beautylog.log('build target ' + whatToPublish + ' not recognised!')
2017-03-07 17:07:03 +00:00
};
return
2016-06-03 00:10:34 +00:00
}