import chalk from 'chalk' ; import { Config } from './config' ; import { Platform } from './platform' ; export class Build { private name = 'kibana' ; private logTag = chalk `{cyan [  kibana  ]}` ; constructor ( private config ) { } resolvePath ( ... args ) { return this . config . resolveFromRepo ( 'build' , this . name , ... args ) ; } resolvePathForPlatform ( platform , ... args ) { return this . config . resolveFromRepo ( 'build' , 'default' , `kibana-${ this . config . getBuildVersion ( ) }-${ platform . getBuildName ( ) }` , ... args ) ; } getPlatformArchivePath ( platform ) { const ext = platform . isWindows ( ) ? 'zip' : 'tar.gz' ; return this . config . resolveFromRepo ( 'target' , `${ this . name }-${ this . config . getBuildVersion ( ) }-${ platform . getBuildName ( ) }.${ ext }` ) ; } getRootDirectory ( ) { return `${ this . name }-${ this . config . getBuildVersion ( ) }` ; } getName ( ) { return this . name ; } getLogTag ( ) { return this . logTag ; } }