Commit c1b1386 1 parent 6b84f30 commit c1b1386 Copy full SHA for c1b1386
File tree 1 file changed +0
-31
lines changed
1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 27
27
from commitizen .version_schemes import (
28
28
get_version_scheme ,
29
29
InvalidVersion ,
30
- VersionProtocol ,
31
30
)
32
31
33
32
logger = getLogger ("commitizen" )
@@ -397,33 +396,3 @@ def _get_commit_args(self):
397
396
if self .no_verify :
398
397
commit_args .append ("--no-verify" )
399
398
return " " .join (commit_args )
400
-
401
- def find_previous_final_version (
402
- self , current_version : VersionProtocol
403
- ) -> VersionProtocol | None :
404
- tag_format : str = self .bump_settings ["tag_format" ]
405
- current = bump .normalize_tag (
406
- current_version ,
407
- tag_format = tag_format ,
408
- scheme = self .scheme ,
409
- )
410
-
411
- final_versions = []
412
- for tag in git .get_tag_names ():
413
- assert tag
414
- try :
415
- version = self .scheme (tag )
416
- if not version .is_prerelease or tag == current :
417
- final_versions .append (version )
418
- except InvalidVersion :
419
- continue
420
-
421
- if not final_versions :
422
- return None
423
-
424
- final_versions = sorted (final_versions )
425
- current_index = final_versions .index (current_version )
426
- previous_index = current_index - 1
427
- if previous_index < 0 :
428
- return None
429
- return final_versions [previous_index ]
You can’t perform that action at this time.
0 commit comments