@@ -141,7 +141,16 @@ def main(force):
141141]
142142
143143version_cmd_options = [
144- click .option ("--version-cmd" , envvar = "RH_VERSION_COMMAND" , help = "The version command" )
144+ click .option ("--version-cmd" , envvar = "RH_VERSION_COMMAND" , help = "The version command" ),
145+ ]
146+
147+ version_create_tag_options = [
148+ click .option (
149+ "--version-create-tag" ,
150+ envvar = "RH_VERSION_CREATE_TAG" ,
151+ is_flag = True ,
152+ help = "Whether to create a tag when bumping the version" ,
153+ ),
145154]
146155
147156
@@ -308,18 +317,28 @@ def prep_git(ref, branch, repo, auth, username, git_url):
308317@main .command ()
309318@add_options (version_spec_options )
310319@add_options (version_cmd_options )
320+ @add_options (version_create_tag_options )
311321@add_options (changelog_path_options )
312322@add_options (use_changelog_version_options )
313323@add_options (python_packages_options )
314324@use_checkout_dir ()
315- def bump_version (version_spec , version_cmd , changelog_path , use_changelog_version , python_packages ):
325+ def bump_version (
326+ version_spec ,
327+ version_cmd ,
328+ version_create_tag ,
329+ changelog_path ,
330+ use_changelog_version ,
331+ python_packages ,
332+ ):
316333 """Prep git and env variables and bump version"""
317334 prev_dir = os .getcwd ()
318335 for python_package in [p .split (":" )[0 ] for p in python_packages ]:
319336 os .chdir (python_package )
320337 lib .bump_version (
321338 version_spec , version_cmd , changelog_path , use_changelog_version = use_changelog_version
322339 )
340+ if version_create_tag :
341+ lib .create_tag ()
323342 os .chdir (prev_dir )
324343
325344
0 commit comments