Skip to content

Commit

Permalink
Switch to setuptools-git-versioning (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly authored Apr 26, 2023
1 parent 3f6a0ee commit 65fe568
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Set package version
run: |
version="${{ github.event.release.tag_name }}"
version="${version,,}" # lowercase it
version="${version#v}" # remove `v`
sed -i "s/version = \"0\.0\.0\"/version = \"${version}\"/" pyproject.toml
- name: Install wheel
run: >-
pip install wheel build
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["setuptools>=61.0.0"]
requires = ["setuptools>=61.0.0", "wheel", "setuptools-git-versioning<2"]
build-backend = "setuptools.build_meta"

[project]
name = "zigpy-cli"
version = "0.0.0"
dynamic = ["version"]
description = "Unified command line interface for zigpy radios"
urls = {repository = "https://github.com/zigpy/zigpy-cli"}
authors = [
Expand Down Expand Up @@ -37,6 +37,9 @@ testing = [
"pytest-cov>=3.0.0",
]

[tool.setuptools-git-versioning]
enabled = true

[project.scripts]
zigpy = "zigpy_cli.__main__:cli"

Expand Down

0 comments on commit 65fe568

Please sign in to comment.