@@ -8,8 +8,11 @@ const readFile = promisify(fs.readFile);
88const writeFile = promisify ( fs . writeFile ) ;
99
1010interface ReleaseTypeArgs {
11+ /** Args to use when invoking the publishScript during the publish hook */
1112 publish : string [ ] ;
13+ /** Args to use when invoking the publishScript during the canary hook */
1214 canary : string [ ] ;
15+ /** Args to use when invoking the publishScript during the next hook */
1316 next : string [ ] ;
1417}
1518
@@ -134,7 +137,7 @@ export default class VersionFilePlugin implements IPlugin {
134137 // Call release script if provided
135138 if ( this . publishScript ) {
136139 auto . logger . log . info ( `Calling release script in repo at ${ this . publishScript } ` ) ;
137- await execPromise ( this . publishScript , this . publishScriptReleaseTypeArgs [ ' publish' ] )
140+ await execPromise ( this . publishScript , this . publishScriptReleaseTypeArgs . publish )
138141 } else {
139142 auto . logger . log . info ( "Skipping calling release script in repo since none was provided" ) ;
140143 }
@@ -162,7 +165,7 @@ export default class VersionFilePlugin implements IPlugin {
162165 // Ship canary release if release script is provided
163166 if ( this . publishScript ) {
164167 auto . logger . log . info ( `Calling release script in repo at ${ this . publishScript } ` ) ;
165- await execPromise ( this . publishScript , this . publishScriptReleaseTypeArgs [ ' canary' ] ) ;
168+ await execPromise ( this . publishScript , this . publishScriptReleaseTypeArgs . canary ) ;
166169 } else {
167170 auto . logger . log . info ( "Skipping calling release script in repo since none was provided" ) ;
168171 }
@@ -209,7 +212,7 @@ export default class VersionFilePlugin implements IPlugin {
209212 // ship next release if release script is provided
210213 if ( this . publishScript ) {
211214 auto . logger . log . info ( `Calling release script in repo at ${ this . publishScript } ` ) ;
212- await execPromise ( this . publishScript , this . publishScriptReleaseTypeArgs [ ' next' ] ) ;
215+ await execPromise ( this . publishScript , this . publishScriptReleaseTypeArgs . next ) ;
213216 } else {
214217 auto . logger . log . info ( "Skipping calling release script in repo since none was provided" ) ;
215218 }
0 commit comments