def replace_version_tag(self):
version_tag = self.arguments.get('<STR_LIT>')<EOL>special_keywords = ['<STR_LIT>', '<STR_LIT>']<EOL>if version_tag in special_keywords:<EOL><INDENT>logger.error("<STR_LIT>".format(version_tag))<EOL>raise SystemExit(<NUM_LIT:1>)<EOL><DEDENT>placeholders = dict(major=<NUM_LIT:0>, minor=<NUM_LIT:1>, trivial=<NUM_LIT:2>)<EOL>placeholder = placeholders.get(version_tag)<EOL>if placeholder is None:<EOL><INDENT>return version_tag<EOL><DEDENT>current_version = self.get_git_describe().lstrip('<STR_LIT:v>')<EOL>version_numbers = current_version.split('<STR_LIT:->')[<NUM_LIT:0>].split('<STR_LIT:.>')<EOL>version_numbers = [int(item) for item in version_numbers]<EOL>version_numbers = version_numbers[:placeholder + <NUM_LIT:1>]<EOL>while len(version_numbers) < <NUM_LIT:3>:<EOL><INDENT>version_numbers.append(<NUM_LIT:0>)<EOL><DEDENT>version_numbers[placeholder] += <NUM_LIT:1><EOL>return '<STR_LIT:.>'.join([str(item) for item in version_numbers[:<NUM_LIT:2> if placeholder < <NUM_LIT:2> else <NUM_LIT:3>]])<EOL>
find the next major/minor/trivial version number if applicable