gitfluff 0.3.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitfluff
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Commit message linter and formatter
5
5
  Author-email: Na'aman Hirschfeld <nhirschfeld@gmail.com>
6
6
  License: MIT
@@ -75,7 +75,7 @@ default_install_hook_types:
75
75
 
76
76
  repos:
77
77
  - repo: https://github.com/Goldziher/gitfluff
78
- rev: v0.3.0
78
+ rev: v0.3.1
79
79
  hooks:
80
80
  - id: gitfluff-lint
81
81
  stages: [commit-msg]
@@ -50,7 +50,7 @@ default_install_hook_types:
50
50
 
51
51
  repos:
52
52
  - repo: https://github.com/Goldziher/gitfluff
53
- rev: v0.3.0
53
+ rev: v0.3.1
54
54
  hooks:
55
55
  - id: gitfluff-lint
56
56
  stages: [commit-msg]
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "0.3.0"
2
+ __version__ = "0.3.1"
@@ -88,11 +88,14 @@ def _extract(archive: Path, ext: str, destination: Path) -> None:
88
88
  raise RuntimeError("Binary not found in downloaded archive")
89
89
 
90
90
 
91
- def _cache_path() -> Path:
92
- cache = Path.home() / ".cache" / "gitfluff"
93
- cache.mkdir(parents=True, exist_ok=True)
91
+ def _cache_path(version: str) -> Path:
92
+ """
93
+ Return a versioned cache path so upgrades download matching binaries.
94
+ """
95
+ cache_dir = Path.home() / ".cache" / "gitfluff" / version
96
+ cache_dir.mkdir(parents=True, exist_ok=True)
94
97
  suffix = ".exe" if platform.system().lower() == "windows" else ""
95
- return cache / f"gitfluff{suffix}"
98
+ return cache_dir / f"gitfluff{suffix}"
96
99
 
97
100
 
98
101
  def ensure_binary() -> str:
@@ -103,7 +106,7 @@ def ensure_binary() -> str:
103
106
  if override:
104
107
  return override
105
108
 
106
- binary_path = _cache_path()
109
+ binary_path = _cache_path(__version__)
107
110
  if binary_path.exists() and os.access(binary_path, os.X_OK):
108
111
  return str(binary_path)
109
112
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitfluff
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Commit message linter and formatter
5
5
  Author-email: Na'aman Hirschfeld <nhirschfeld@gmail.com>
6
6
  License: MIT
@@ -75,7 +75,7 @@ default_install_hook_types:
75
75
 
76
76
  repos:
77
77
  - repo: https://github.com/Goldziher/gitfluff
78
- rev: v0.3.0
78
+ rev: v0.3.1
79
79
  hooks:
80
80
  - id: gitfluff-lint
81
81
  stages: [commit-msg]
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitfluff"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Commit message linter and formatter"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes