Closed atwam closed 1 year ago
I've renamed the part to HEXHASH
, primarily to avoid this lint error: A001 variable "hash" is shadowing a python builtin
.
As with the GITHASH
part, I'm going to leave this undocumented. Ultimately I think this still needs some work to be populated automatically. As far as I can tell, this part can only be populated using --set-version
, which defeats a large part of the purpose of bumpver
.
Thanks for fixing the checks. I agree that this defeats partly the purpose of bumpver, or rather it makes a partial use of it in my case:
git describe
for the last part of the hashset-version
for bumpver to update the various files.
But thanks for adding this.
Hi, Having spent now a few months with bumpver for a project, I became frustated by the GITHASH part: Because GITHASH forces a starting
.
then a hash, it is not possible to have a version that matches bothv2023.40.0
andv2023.40.0+1234
. The former can be obtained withvYYYY.0W.INC0
, the latter withvYYYY.0W.GITHASH
. If one combines both withvYYYY.0W[.INC0][GITHASH]
, then trying to set a version tov2023.40.0
will just omit the last.0
, because it's the default value of optional.INC0
. The resulting versionv2023.40
is not semver compliant, and will break some tools (for examplecargo
)I have added the
HASH
part, to be any hexadecimal hash. This is useful to add a hash-like that may come from any checksum, vsc.This allows patterns where a hash may be present or ommitted, such as vYYYY.0W.INC0[\+HASH] which can accept v2023.40.0 or v2023.40.1+abc123