Skip to content

Commit 65fe568

Browse files
authored
Switch to setuptools-git-versioning (#38)
1 parent 3f6a0ee commit 65fe568

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.github/workflows/publish-to-pypi.yml

-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ jobs:
1414
uses: actions/setup-python@v4
1515
with:
1616
python-version: 3.8
17-
- name: Set package version
18-
run: |
19-
version="${{ github.event.release.tag_name }}"
20-
version="${version,,}" # lowercase it
21-
version="${version#v}" # remove `v`
22-
sed -i "s/version = \"0\.0\.0\"/version = \"${version}\"/" pyproject.toml
2317
- name: Install wheel
2418
run: >-
2519
pip install wheel build

pyproject.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=61.0.0"]
2+
requires = ["setuptools>=61.0.0", "wheel", "setuptools-git-versioning<2"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "zigpy-cli"
7-
version = "0.0.0"
7+
dynamic = ["version"]
88
description = "Unified command line interface for zigpy radios"
99
urls = {repository = "https://github.com/zigpy/zigpy-cli"}
1010
authors = [
@@ -37,6 +37,9 @@ testing = [
3737
"pytest-cov>=3.0.0",
3838
]
3939

40+
[tool.setuptools-git-versioning]
41+
enabled = true
42+
4043
[project.scripts]
4144
zigpy = "zigpy_cli.__main__:cli"
4245

0 commit comments

Comments
 (0)