@@ -11,6 +11,7 @@ import chalk from 'chalk';
1111
1212import type { Config } from './config' ;
1313import type { Platform } from './platform' ;
14+ import { dashSuffix } from './util' ;
1415
1516export class Build {
1617 private buildDesc : string = '' ;
@@ -24,32 +25,30 @@ export class Build {
2425 }
2526
2627 resolvePathForPlatform ( platform : Platform , ...args : string [ ] ) {
27- const variant = platform . getVariant ( ) ? `-${ platform . getVariant ( ) } ` : '' ;
28- const solution = platform . getSolution ( ) ? `-${ platform . getSolution ( ) } ` : '' ;
2928 return this . config . resolveFromRepo (
3029 'build' ,
3130 'default' ,
32- `kibana${ variant } ${ solution } -${ this . config . getBuildVersion ( ) } -${ platform . getBuildName ( ) } ` ,
31+ `kibana${ dashSuffix ( platform . getVariant ( ) ) } ${ dashSuffix (
32+ platform . getSolutionArtifact ( )
33+ ) } -${ this . config . getBuildVersion ( ) } -${ platform . getBuildName ( ) } `,
3334 ...args
3435 ) ;
3536 }
3637
3738 getPlatformArchivePath ( platform : Platform ) {
3839 const ext = platform . isWindows ( ) ? 'zip' : 'tar.gz' ;
39- const variant = platform . getVariant ( ) ? `-${ platform . getVariant ( ) } ` : '' ;
40- const solution = platform . getSolution ( ) ? `-${ platform . getSolution ( ) } ` : '' ;
4140 return this . config . resolveFromRepo (
4241 'target' ,
43- `${
44- this . name
45- } ${ variant } ${ solution } -${ this . config . getBuildVersion ( ) } -${ platform . getBuildName ( ) } .${ ext } `
42+ `${ this . name } ${ dashSuffix ( platform . getVariant ( ) ) } ${ dashSuffix (
43+ platform . getSolutionArtifact ( )
44+ ) } -${ this . config . getBuildVersion ( ) } -${ platform . getBuildName ( ) } .${ ext } `
4645 ) ;
4746 }
4847
4948 getRootDirectory ( platform : Platform ) {
50- const variant = platform . getVariant ( ) ? `- ${ platform . getVariant ( ) } ` : '' ;
51- const solution = platform . getSolution ( ) ? `- ${ platform . getSolution ( ) } ` : '' ;
52- return ` ${ this . name } ${ variant } ${ solution } -${ this . config . getBuildVersion ( ) } `;
49+ return ` ${ this . name } ${ dashSuffix ( platform . getVariant ( ) ) } ${ dashSuffix (
50+ platform . getSolutionArtifact ( )
51+ ) } -${ this . config . getBuildVersion ( ) } `;
5352 }
5453
5554 getName ( ) {
0 commit comments