Skip to content

Commit

Permalink
fix pdm version issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Jan 16, 2024
1 parent c8f9e4e commit 550e190
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
- id: current-version
run: echo ::set-output name=CURRENT_VERSION::$(./pw pdm show --version)

# https://github.com/pdm-project/pdm/issues/2561
- run: lerna version ${{ steps.current-version.outputs.CURRENT_VERSION }} --force-publish --no-git-tag-version --yes

- run: npm run install:all

- name: Build VSIX
Expand Down
6 changes: 0 additions & 6 deletions __version__.py

This file was deleted.

8 changes: 8 additions & 0 deletions get_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from __future__ import annotations

from json import loads
from pathlib import Path


def get_version() -> str:
return loads((Path(__file__).parent / "lerna.json").read_text())["version"]
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ package-type = "library"
[tool.pdm.dev-dependencies]
dev = ["black>=23", "pylint>=3.0.0a7", "ruff>=0.0.290"]

# https://github.com/pdm-project/pdm/issues/2561
# [tool.pdm.version]
# source = "file"
# path = "__version__.py"
[tool.pdm.version]
source = "call"
getter = "get_version:get_version"

[project]
name = "basedpyright"
description = "static type checking for Python (but based)"
version = "0.2.4"
# dynamic = ["version"]
dynamic = ["version"]
authors = [
{ name = "detachhead", email = "detachhead@users.noreply.github.com" },
]
Expand Down Expand Up @@ -247,7 +245,7 @@ max-line-length = 200
[tool.pyright]
pythonVersion = "3.8"
pythonPlatform = "All"
include = ["basedpyright", "__version__.py", "pdm_build.py"]
include = ["basedpyright", "get_version.py", "pdm_build.py"]
exclude = ['basedpyright/dist']
reportMissingTypeStubs = false
strictListInference = true
Expand Down

0 comments on commit 550e190

Please sign in to comment.