File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ _Examples:_
132132- [ brew] ( ../generated/brew ) - Create a new brew formula once the package a=has been versioned
133133
134134``` ts
135- auto .hooks .afterVersion .tapPromise (" NPM" , async ({ dryRun }) => {});
135+ auto .hooks .afterVersion .tapPromise (" NPM" , async ({ dryRun , version }) => {});
136136```
137137
138138## publish
Original file line number Diff line number Diff line change @@ -264,7 +264,10 @@ export interface IAutoHooks {
264264 ]
265265 > ;
266266 /** Ran after the package has been versioned. */
267- afterVersion : AsyncSeriesHook < [ DryRunOption ] > ;
267+ afterVersion : AsyncSeriesHook < [ DryRunOption & {
268+ /** The version to release, if any */
269+ version ?: string ;
270+ } ] > ;
268271 /** Publish the package to some package distributor. You must push the tags to github! */
269272 publish : AsyncSeriesHook <
270273 [
@@ -1777,7 +1780,7 @@ export default class Auto {
17771780 const releaseArgs = await this . makeReleaseContext ( ) ;
17781781
17791782 this . logger . verbose . info ( "Calling after version hook" ) ;
1780- await this . hooks . afterVersion . promise ( { dryRun : options . dryRun } ) ;
1783+ await this . hooks . afterVersion . promise ( { dryRun : options . dryRun , version : releaseArgs . newVersion } ) ;
17811784
17821785 if ( ! options . dryRun ) {
17831786 this . logger . verbose . info ( "Calling publish hook" ) ;
You can’t perform that action at this time.
0 commit comments