Version updater for components in your codebase
Problem to solve
In project where there are many components to track new versions (docker images and pypi packages) this tool automates finding new versions, running tests and commit changes to git.
Create YAML file with definition of your components (see example in
tests/test_files/components.yaml ). Place
components.yaml in the
root of your project directory and run:
python check_version.py --file=/path/to/your/components.yaml --dry-run check --verbose
It will, for each defined component:
Check if there are new versions of your components available
Replace in all files version numbers to the newest one
Add and commit changes to git
Install via pypi packages repository:
pip install updater
updater [OPTIONS] COMMAND [ARGS]...
YAML file with components configuration. If not present other options for ‘check’ command are required.
If this option is given components configuration with new versions will be wrtten here.
If set no changes to any files are written.
Config is printed to stdout at the end.
Check if new versions of defined components are available.
updater check [OPTIONS]
Component type: docker-image or pypi package.
Component name to version veryfication.
Repository name if component is docker image.
Version tag eg. v2.3.0 against which new version check will be run.
Print detailed info for each component about new version avaialble.
Update files with version numbers, run test and commit changes.
updater update [OPTIONS]
Command that should be run after updating each component.
If test-command param is given, this will be the context dir to run it.
When set after each components update, git commit is performed in active branch.
If given, then it will be treated as a root dir for paths in config file.