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)
| 1433 | |
| 1434 | |
| 1435 | def render_pep440(pieces): |
| 1436 | """Build up version string, with post-release "local version identifier". |
| 1437 | |
| 1438 | Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you |
| 1439 | get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty |
| 1440 | |
| 1441 | Exceptions: |
| 1442 | 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] |
| 1443 | """ |
| 1444 | if pieces["closest-tag"]: |
| 1445 | rendered = pieces["closest-tag"] |
| 1446 | if pieces["distance"] or pieces["dirty"]: |
| 1447 | rendered += plus_or_dot(pieces) |
| 1448 | rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) |
| 1449 | if pieces["dirty"]: |
| 1450 | rendered += ".dirty" |
| 1451 | else: |
| 1452 | # exception #1 |
| 1453 | rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) |
| 1454 | if pieces["dirty"]: |
| 1455 | rendered += ".dirty" |
| 1456 | return rendered |
| 1457 | |
| 1458 | |
| 1459 | def render_pep440_branch(pieces): |
no test coverage detected
searching dependent graphs…