Skip to content

Commit

Permalink
🔎 Read Hugo binary version from repository root
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Jan 6, 2024
1 parent bca99f8 commit d3e7b10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python_hugo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

from __future__ import annotations

import importlib.metadata
import os
import platform
import sys
from pathlib import Path
from functools import lru_cache

HUGO_VERSION = importlib.metadata.version("python-hugo")
# Read Hugo version from VERSION file in repository root
HUGO_VERSION = Path(__file__).parent.parent.joinpath("HUGO_VERSION").read_text().strip()

FILE_EXT = ".exe" if sys.platform == "win32" else ""
HUGO_PLATFORM = {
"darwin": "darwin",
Expand Down

0 comments on commit d3e7b10

Please sign in to comment.