Add environment output option (#152)

Add --env option for environment output
This commit is contained in:
Dave Wapstra 2021-01-17 22:20:14 +01:00 committed by GitHub
parent b337765114
commit 140ac2e79b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 4 deletions

View file

@ -538,7 +538,7 @@ ERROR - No patterns matched for file 'src/mymodule/utils.py'
$ bumpver --help
Usage: bumpver [OPTIONS] COMMAND [ARGS]...
Automatically update CalVer version strings in plaintext files.
Automatically update version strings in plaintext files.
Options:
--version Show the version and exit.
@ -591,6 +591,21 @@ Options:
<!-- END bumpver update --help -->
To help with shell script automation, you can use `bumpver show --env`.
```shell
$ bumpver show -n --env
YEAR_Y=2020
YEAR_G=
...
TAG=final
...
$ eval $(bumpver show -n --env)
$ echo $TAG
final
```
### Part Overview