File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ _Examples:_
132
132
- [ brew] ( ../generated/brew ) - Create a new brew formula once the package a=has been versioned
133
133
134
134
``` ts
135
- auto .hooks .afterVersion .tapPromise (" NPM" , async ({ dryRun }) => {});
135
+ auto .hooks .afterVersion .tapPromise (" NPM" , async ({ dryRun , version }) => {});
136
136
```
137
137
138
138
## publish
Original file line number Diff line number Diff line change @@ -262,7 +262,10 @@ export interface IAutoHooks {
262
262
]
263
263
> ;
264
264
/** Ran after the package has been versioned. */
265
- afterVersion : AsyncSeriesHook < [ DryRunOption ] > ;
265
+ afterVersion : AsyncSeriesHook < [ DryRunOption & {
266
+ /** The version to release, if any */
267
+ version ?: string ;
268
+ } ] > ;
266
269
/** Publish the package to some package distributor. You must push the tags to github! */
267
270
publish : AsyncSeriesHook <
268
271
[
@@ -1763,7 +1766,7 @@ export default class Auto {
1763
1766
const releaseArgs = await this . makeReleaseContext ( ) ;
1764
1767
1765
1768
this . logger . verbose . info ( "Calling after version hook" ) ;
1766
- await this . hooks . afterVersion . promise ( { dryRun : options . dryRun } ) ;
1769
+ await this . hooks . afterVersion . promise ( { dryRun : options . dryRun , version : releaseArgs . newVersion } ) ;
1767
1770
1768
1771
if ( ! options . dryRun ) {
1769
1772
this . logger . verbose . info ( "Calling publish hook" ) ;
You can’t perform that action at this time.
0 commit comments