Version¶
-
class
version.
Version
¶ Bases:
object
A representation of the version tag.
-
major
¶ The major version number of the version
Type: int
-
minor
¶ The minor version number of the version
Type: int
-
bug
¶ The bug version number of the version
Type: int
-
stage
¶ The stage of the version
Type: Version.Stage
-
stageRev
¶ The stage revision of the version
Type: int
-
class
Stage
¶ Bases:
enum.IntEnum
The different stages the program can be set.
-
UNKNOWN
= -1¶
-
DEVELOPMENT
= 0¶
-
RELEASE
= 1¶
-
RELEASE_CANDIDATE
= 2¶
-
ALPHA
= 3¶
-
BETA
= 4¶
-
-
StageStringsToStages
= {'alpha': <Stage.ALPHA: 3>, 'beta': <Stage.BETA: 4>, 'dev': <Stage.DEVELOPMENT: 0>, 'rc': <Stage.RELEASE_CANDIDATE: 2>, 'rel': <Stage.RELEASE: 1>}¶
-
static
GetCurrentTag
() → str¶ Get the current tag.
Returns: The current tag.
-
static
GetPreviousTag
() → str¶ Get the previous tag.
Returns: The previous tag.
-
static
GetCurrentHash
() → str¶ Get the hash of the current Git commit.
Returns: The hash of the current commit.
-
static
GetPreviousHash
() → str¶ Get the hash of the previous Git commit.
Returns: The hash of the previous commit.
-
static
GetCommitsBetweenIds
(newer: str, older: str) → list¶ Get a list of commits between two Git commits.
Parameters: - newer (str) – The newer Git commit id for the comparison.
- older (str) – The older Git commit id for the comparison.
Returns: A list of commits.
-
static
GenerateVersionFromString
(versionString: str)¶ Create an instance of the Version class based on the tag string.
Parameters: versionString (str) – The Git tag in human readable format. Returns: An instance of the Version class.
-
static
PushTagsToOrigin
() → error_code.ErrorCode¶ Push existing Git tags to ‘origin’.
-
-
version.
HandleDiffCommand
(argv: list, argc: int) → error_code.ErrorCode¶
-
version.
HandleHashCommand
(argv: list, argc: int) → error_code.ErrorCode¶
-
version.
HandleTagCommand
(argv: list, argc: int) → error_code.ErrorCode¶
-
version.
PrintHelpMessageGet
(argv: list, argc: int) → error_code.ErrorCode¶
-
version.
HandleGetCommand
(argv: list, argc: int) → error_code.ErrorCode¶
-
version.
PrintHelpMessage
(argv: list, argc: int) → error_code.ErrorCode¶
-
version.
HandleCommand
(argv: list, argc: int) → error_code.ErrorCode¶ Handle a command given to this module
Parameters: - argv (list) – The given arguments.
- argc (int) – The count of given arguments.
Returns: An ErrorCode object telling what the outcome of calling the function was.