undocument GITHASH

This commit is contained in:
Manuel Barkhau 2022-06-08 19:38:32 +00:00 committed by mbarkhau
parent 1695fb0670
commit d025746695
2 changed files with 13 additions and 6 deletions

View file

@ -4,6 +4,7 @@
- Add ``GITHASH`` to ``version_pattern`` (@mpasternak) - Add ``GITHASH`` to ``version_pattern`` (@mpasternak)
## BumpVer 2022.1116 ## BumpVer 2022.1116
- Fix: [incorrect version comparison when updating from vcs tag][gh_i174]. - Fix: [incorrect version comparison when updating from vcs tag][gh_i174].

View file

@ -412,10 +412,13 @@ INFO - New Version: v2020.1060
+__version__ = "v2020.1060" +__version__ = "v2020.1060"
``` ```
<!--
#### Add git hash to version string #### Add git hash to version string
In case you want to build a package straight from your git repository, without making a release first, If you want to build a package straight from your git repository,
you can explictly add git hash to the version number using ``GITHASH`` version part. without making a release first, you can explictly add git hash to
the version number using ``GITHASH`` version part.
Let's say your ``setup.cfg`` looks like this: Let's say your ``setup.cfg`` looks like this:
@ -432,10 +435,13 @@ Then, to update all configured files, you need to execute this command:
$ bumpver update --no-commit --no-tag --set-version="v202202.1085.8+ged2c3aaf" $ bumpver update --no-commit --no-tag --set-version="v202202.1085.8+ged2c3aaf"
``` ```
This will modify your source tree, but won't commit or tag aything, so you can build your This will modify your source tree, but won't commit or tag
packages with that version number. Then, remember to reset local changes after (by anything, so you can build your packages with that version
typing ``git reset --hard``) as standard bumpver behaviour with such version number number. Then, remember to reset local changes after (by typing
makes not much sense. ``git reset --hard``) as standard bumpver behaviour with such
version number makes not much sense.
-->
### Searching for Patterns with `grep` ### Searching for Patterns with `grep`