Skip to content

Commit 6eb7f5a

Browse files
authored
Merge pull request #51 from tekktrik/dev/populate-version
Allow __version__ population, fix problem matchers
2 parents 84d4368 + e4ce154 commit 6eb7f5a

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
4848
- name: Library version
4949
run: git describe --dirty --always --tags
50+
- name: Setup problem matchers
51+
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
5052
- name: Pre-commit hooks
5153
run: |
5254
pre-commit run --all-files
@@ -68,7 +70,8 @@ jobs:
6870
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
6971
run: |
7072
pip install --upgrade build twine
73+
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
74+
sed -i -e "s/0.0.0-auto.0/1.2.3/" $file;
75+
done;
7176
python -m build
7277
twine check dist/*
73-
- name: Setup problem matchers
74-
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,8 @@ jobs:
8181
TWINE_USERNAME: ${{ secrets.pypi_username }}
8282
TWINE_PASSWORD: ${{ secrets.pypi_password }}
8383
run: |
84+
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
85+
sed -i -e "s/0.0.0-auto.0/${{github.event.release.tag_name}}/" $file;
86+
done;
8487
python -m build
8588
twine upload dist/*

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ requires = [
1212
[project]
1313
name = "adafruit-circuitpython-bme680"
1414
description = "CircuitPython driver for BME680 sensor over I2C"
15+
version = "0.0.0-auto.0"
1516
readme = "README.rst"
1617
authors = [
1718
{name = "Adafruit Industries", email = "[email protected]"}
@@ -38,12 +39,10 @@ classifiers = [
3839
"License :: OSI Approved :: MIT License",
3940
"Programming Language :: Python :: 3",
4041
]
41-
dynamic = ["version", "dependencies"]
42+
dynamic = ["dependencies"]
4243

4344
[tool.setuptools]
4445
py-modules = ["adafruit_bme680"]
4546

4647
[tool.setuptools.dynamic]
4748
dependencies = {file = ["requirements.txt"]}
48-
49-
[tool.setuptools_scm]

0 commit comments

Comments
 (0)