diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 303db178..e7533d62 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -35,16 +35,6 @@ jobs: - name: Install Application run: python -m pip install --upgrade pip && pip install --upgrade . - - name: 📝 Set Pre-Release Version for Master - if: github.ref == 'refs/heads/master' - run: sed -E -i "s/version = (.*)\"/version = \1a$(date +%s)\"/g" pyproject.toml - - - name: 📝 Set Development Version for PR - if: github.event_name == 'pull_request' - env: - PULL_REQUEST_NUMBER: ${{ github.event.number }} - run: sed -E -i "s/version = (.*)\"/version = \1.dev$PULL_REQUEST_NUMBER$(date +%s)\"/g" pyproject.toml - - name: ⚙️ Build Python Package run: | # Setup Environment for Reproducible Builds diff --git a/pyproject.toml b/pyproject.toml index 119f4f3e..af41cc5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,9 @@ [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" [project] name = "khoj-assistant" -version = "0.3.0" description = "A natural language search engine for your personal notes, transactions and images" readme = "README.md" license = "GPL-3.0-or-later" @@ -52,6 +51,7 @@ dependencies = [ "torch == 1.13.1", "uvicorn == 0.17.6", ] +dynamic = ["version"] [project.urls] Homepage = "https://github.com/debanjum/khoj#readme" @@ -73,6 +73,10 @@ dev = [ "pre-commit >= 3.0.4", ] +[tool.hatch.version] +source = "vcs" +raw-options.local_scheme = "no-local-version" # PEP440 compliant version for PyPi + [tool.hatch.build.targets.sdist] include = ["src/khoj"]