Build up version string, with post-release "local version identifier". Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty Exceptions: 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
(pieces)
| 369 | |
| 370 | |
| 371 | def render_pep440(pieces): |
| 372 | """Build up version string, with post-release "local version identifier". |
| 373 | |
| 374 | Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you |
| 375 | get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty |
| 376 | |
| 377 | Exceptions: |
| 378 | 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] |
| 379 | """ |
| 380 | if pieces["closest-tag"]: |
| 381 | rendered = pieces["closest-tag"] |
| 382 | if pieces["distance"] or pieces["dirty"]: |
| 383 | rendered += plus_or_dot(pieces) |
| 384 | rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) |
| 385 | if pieces["dirty"]: |
| 386 | rendered += ".dirty" |
| 387 | else: |
| 388 | # exception #1 |
| 389 | rendered = "0+untagged.%d.g%s" % (pieces["distance"], |
| 390 | pieces["short"]) |
| 391 | if pieces["dirty"]: |
| 392 | rendered += ".dirty" |
| 393 | return rendered |
| 394 | |
| 395 | |
| 396 | def render_pep440_branch(pieces): |
no test coverage detected
searching dependent graphs…