The definitive tools to manage VERSION and change file
Project description
cndversion
The definitive tools to manage VERSION and CHANGES files (based on semver)
Installation
pip install cndversion
Usage
Help accessible from here
cndversion --help
Setup a new project in a folder
cndversion -f mylib
if will create
project
│ VERSION
│ CHANGES
└───mylib
│ │ __init__.py
│ │ __version__.py
│ │ VERSION
Bump to major version
cndversion -M
it will increase the major version in mylib/VERSION file and add commit message to CHANGES
Bump to minor version
cndversion -m
it will increase the minor version in mylib/VERSION file and add commit message to CHANGES
Bump to patch version
cndversion -p
it will increase the patch version in mylib/VERSION file and add commit message to CHANGES
What in each file ?
VERSION
This file content is the path for the "real" VERSION file (use for compatibilities with somes old tools)
>>>> cat VERSION
mylib/VERSION
CHANGES
This file is just empty
>>>> cat CHANGE
mylib/init.py
Simply include in the beginning of the file the version file
>>>> cat mylib/__init__.py
from .__version__ import (__version__) # noqa: F401
mylib/version.py
Allow you to include VERSION into the package (usefull for lib)
>>>> cat mylib/__version__.py
import pkg_resources
path = pkg_resources.resource_filename('mylib', 'VERSION')
__version__ = open(path).read()
mylib/VERSION
This file is the real version number
>>>> cat mylib/VERSION
0.1.1
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cndversion-2.0.2.tar.gz.
File metadata
- Download URL: cndversion-2.0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84c9e8b3340a773c0c528d0bced7c11a1287a9545d0eda757edb7389ae08bb4f
|
|
| MD5 |
81614beacd164ff428cc6331ca07f74e
|
|
| BLAKE2b-256 |
5e1f9871e9a9ebb81b359557b62aaaabf3c29448ad949dfbfd996980be1f72e6
|
File details
Details for the file cndversion-2.0.2-py3-none-any.whl.
File metadata
- Download URL: cndversion-2.0.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea072b94c5e39b45e041a2dcf78fe6f8d1f33160e2f2962bb3429871b2669a05
|
|
| MD5 |
57a9205478990c70c787e5bdcc0a69e7
|
|
| BLAKE2b-256 |
64762200e069022d0bab3a355c1d58fd52cfedec9a4295760fe06c0907df5bc4
|