File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 2727from commitizen .version_schemes import (
2828 get_version_scheme ,
2929 InvalidVersion ,
30- VersionProtocol ,
3130)
3231
3332logger = getLogger ("commitizen" )
@@ -397,33 +396,3 @@ def _get_commit_args(self):
397396 if self .no_verify :
398397 commit_args .append ("--no-verify" )
399398 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