File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,22 @@ import { PackageRename } from './shared-types';
11
11
* Get the most recent tag for a project.
12
12
*
13
13
* @param options - Options.
14
+ * @param options.fetchRemote - Whether to synchronize local tags with remote.
14
15
* @param options.tagPrefixes - A list of tag prefixes to look for, where the first is the intended
15
16
* prefix and each subsequent prefix is a fallback in case the previous tag prefixes are not found.
16
17
* @returns The most recent tag.
17
18
*/
18
19
async function getMostRecentTag ( {
20
+ fetchRemote = true ,
19
21
tagPrefixes,
20
22
} : {
23
+ fetchRemote : boolean ;
21
24
tagPrefixes : [ string , ...string [ ] ] ;
22
25
} ) {
23
26
// Ensure we have all tags on remote
24
- await runCommand ( 'git' , [ 'fetch' , '--tags' ] ) ;
27
+ if ( fetchRemote ) {
28
+ await runCommand ( 'git' , [ 'fetch' , '--tags' ] ) ;
29
+ }
25
30
26
31
let mostRecentTagCommitHash : string | null = null ;
27
32
for ( const tagPrefix of tagPrefixes ) {
You can’t perform that action at this time.
0 commit comments