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.
TL;DR
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
-
Run tests
-
Add and commit changes to git
Installation
Install via pypi packages repository:
pip install updater
Usage
updater
updater [OPTIONS] COMMAND [ARGS]...
Options
--file
YAML file with components configuration. If not present other options for ‘check’ command are required.
--destination-file <destination_file>
If this option is given components configuration with new versions will be wrtten here.
--dry-run
If set no changes to any files are written.
Config is printed to stdout at the end.
check
Check if new versions of defined components are available.
updater check [OPTIONS]
Options
--type <component_type>
Component type: docker-image or pypi package.
--component
Component name to version veryfication.
--repo_name <repo_name>
Repository name if component is docker image.
--version_tag <version_tag>
Version tag eg. v2.3.0 against which new version check will be run.
--verbose
Print detailed info for each component about new version avaialble.
update
Update files with version numbers, run test and commit changes.
updater update [OPTIONS]
Options
--test-command <test_command>
Command that should be run after updating each component.
--test-dir <test_dir>
If test-command param is given, this will be the context dir to run it.
--git-commit
When set after each components update, git commit is performed in active branch.
Metadata
Release files for updater 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| updater-0.1.5.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| updater-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / updater-0.1.5.tar.gz
| Download URL | updater-0.1.5.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2c42bdd390c6eae6b25da1f6b5024749976acb8cdeb5f1ea82ded3797ea2aac
|
|
BLAKE2b-256 checksum How to use checksums |
2ce64edfd9ae1d3573fa68637258518749ac77f1d3452980567a503e15a712a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Release files / updater-0.1.5-py3-none-any.whl
| Download URL | updater-0.1.5-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
724ece114f7e0c2e532add7517933228a893927329996981c4e15a8eb41969e1
|
|
BLAKE2b-256 checksum How to use checksums |
451bb879731fd820cec3abbcd633bd3fa92db3cc4b90795e78c6573eec5b9520
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|