Usage¶
The versionah script is the main workhorse of the versionah
module.
Let’s start with some basic examples:
$ versionah display _version.py # Read the version data from _version.py
2.4.3
$ versionah bump _version.py minor # Bump the minor component
2.5.0
$ versionah bump _version.py major # Bump the major component
3.0.0
$ versionah set _version.rb 0.2.0 # Set the version in _version.rb to 0.2.0
0.2.0
$ versionah bump _version.h minor # Bump the minor component in _version.h
0.4.0
versionah¶
A tool to manage project version files.
versionah [OPTIONS] COMMAND [ARGS]...
Options
-
--version
¶
Show the version and exit.
bump¶
Bump version in existing file.
versionah bump [OPTIONS] FILENAME... [major|minor|micro|patch]
Options
-
-d
,
--display
<display_format>
¶ Display format for output.
- Options
date|dict|dotted|hex|libtool|tuple|web
-
-t
,
--type
<file_type>
¶ Define the file type used for version file.
- Options
c|go|h|json|lua|m4|moon|nim|py|rb|text
-
--shtool
,
--no-shtool
¶
Write shtool compatible output.
Arguments
-
FILENAME
¶
Required argument(s)
-
BUMP
¶
Required argument
display¶
Display version in given file.
versionah display [OPTIONS] FILENAME...
Options
-
-d
,
--display
<display_format>
¶ Display format for output.
- Options
date|dict|dotted|hex|libtool|tuple|web
Arguments
-
FILENAME
¶
Required argument(s)
set¶
Set version in given file.
versionah set [OPTIONS] FILENAME... VERSION_STR
Options
-
-d
,
--display
<display_format>
¶ Display format for output.
- Options
date|dict|dotted|hex|libtool|tuple|web
-
-t
,
--type
<file_type>
¶ Define the file type used for version file.
- Options
c|go|h|json|lua|m4|moon|nim|py|rb|text
-
--shtool
,
--no-shtool
¶
Write shtool compatible output.
-
-n
,
--name
<name>
¶ Package name for version(default from $PWD).
Arguments
-
FILENAME
¶
Required argument(s)
-
VERSION_STR
¶
Required argument