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';
1111 * Get the most recent tag for a project.
1212 *
1313 * @param options - Options.
14+ * @param options.fetchRemote - Whether to synchronize local tags with remote.
1415 * @param options.tagPrefixes - A list of tag prefixes to look for, where the first is the intended
1516 * prefix and each subsequent prefix is a fallback in case the previous tag prefixes are not found.
1617 * @returns The most recent tag.
1718 */
1819async function getMostRecentTag ( {
20+ fetchRemote,
1921 tagPrefixes,
2022} : {
23+ fetchRemote ?: boolean ;
2124 tagPrefixes : [ string , ...string [ ] ] ;
2225} ) {
2326 // Ensure we have all tags on remote
24- await runCommand ( 'git' , [ 'fetch' , '--tags' ] ) ;
27+ if ( typeof fetchRemote !== 'boolean' || fetchRemote ) {
28+ await runCommand ( 'git' , [ 'fetch' , '--tags' ] ) ;
29+ }
2530
2631 let mostRecentTagCommitHash : string | null = null ;
2732 for ( const tagPrefix of tagPrefixes ) {
You can’t perform that action at this time.
0 commit comments