Skip to content

Commit

Permalink
Fix version parsing and Git sparse-clone check (#151)
Browse files Browse the repository at this point in the history
* removed padding in version parsing

* update version and changelog

* fixed another bug that I can't believe I didn't catch. Need to pay more attention

* changelog update
  • Loading branch information
jdoiro3 authored Jun 24, 2024
1 parent 5f8f062 commit f017969
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.8.2

### Prs in Release

- [Fix Version Parsing and Git Version Check](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/151)

## 0.8.1

### Prs in Release
Expand Down
8 changes: 4 additions & 4 deletions mkdocs_multirepo_plugin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def parse_version(val: str) -> Version:
version: str = match.group(1) if match else ""
major, minor, patch = version.split(".", maxsplit=2)
return Version(
major=int(major.ljust(2, "0")),
minor=int(minor.ljust(2, "0")),
patch=int(patch.ljust(2, "0")),
major=int(major),
minor=int(minor),
patch=int(patch),
)


Expand All @@ -103,7 +103,7 @@ def git_supports_sparse_clone() -> bool:
"""The sparse-checkout was added in 2.25.0
See RelNotes here: https://github.com/git/git/blob/9005149a4a77e2d3409c6127bf4fd1a0893c3495/Documentation/RelNotes/2.25.0.txt#L67
"""
return git_version() < Version(2, 25, 0)
return git_version() >= Version(2, 25, 0)


async def execute_bash_script(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mkdocs-multirepo-plugin"
version = "0.8.1"
version = "0.8.2"
description = "Build documentation in multiple repos into one site."
authors = ["jdoiro3 <josephdoiron1234@yahoo.com>"]
license = "MIT"
Expand Down

0 comments on commit f017969

Please sign in to comment.