This is a simple CLI that allows you to update a version.txt file with a build number.
This utility is distributed via pypi packages.
Install like this:
pip3 install traviscli
traviscli --help
Usage: traviscli [OPTIONS]
Use this command to get the Travis CI build number of your project. Assumes
you are using Semantic Versioning
Options:
-b, --build-count INTEGER Number builds to check.
-r, --repo-slug TEXT something thing like hasii2011/PyUt. [required]
-f, --file PATH Relative location of version text file
--major-version INTEGER Change the major number to the specified one
--minor-version INTEGER Change the minor number to the specified one
--patch-version INTEGER Change the patch number to the specified one
--version Show the version and exit.
--help Show this message and exit.
Go to your TravisCI Profile-->Settings-->Settings
Tab
For example:
Create a file named .travis-cli.ini
in your home directory (or where $HOME
points to)
[TRAVISCI]
travisci_api_token = Your Token goes here
The version string in your version file should follow the rules for semantic versioning
For example, here is a correctly formatted version string
6.2.1+.500