diff --git a/frontend/package.json b/frontend/package.json index 47c83d9..3060f46 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "mediahive-frontend", - "version": "1.0.0", + "version": "0.0.0", "description": "Netflix-style media streaming for your collection", "type": "module", "scripts": { diff --git a/pyproject.toml b/pyproject.toml index 1709e21..52fb759 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mediahive" -version = "0.1.0" +dynamic = ["version"] description = "MediaHive - Media scanning, indexing, and Netflix-style streaming" readme = "README.md" requires-python = ">=3.14" @@ -21,9 +21,12 @@ dependencies = [ mediahive = "mediahive.__main__:main" [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" +[tool.hatch.version] +source = "vcs" + [tool.hatch.build] packages = ["mediahive"] artifacts = ["mediahive/frontend-build"] @@ -48,4 +51,5 @@ gui = [ [dependency-groups] dev = [ "httpx>=0.28.1", + "setuptools-scm>=8", ] diff --git a/scripts/winbuild.py b/scripts/winbuild.py index 05b8eaf..2fe7f2e 100644 --- a/scripts/winbuild.py +++ b/scripts/winbuild.py @@ -17,11 +17,12 @@ import io import shutil import subprocess import sys -import tomllib import urllib.request import zipfile from pathlib import Path +import setuptools_scm + # BtbN automated builds always publish a 'latest' tag with this asset. _FFMPEG_URL = ( "https://github.com/BtbN/ffmpeg-builds/releases/download/latest" @@ -57,11 +58,9 @@ def fetch_ffmpeg() -> Path: def read_version() -> str: - """Read version from pyproject.toml.""" - pyproject = Path(__file__).parent.parent / "pyproject.toml" - with open(pyproject, "rb") as f: - data = tomllib.load(f) - return data["project"]["version"] + """Read version via setuptools_scm (same logic as hatch-vcs).""" + repo_root = Path(__file__).parent.parent + return setuptools_scm.get_version(root=str(repo_root)) def build_wheel() -> None: