Skip to content

Commit 6b98d6f

Browse files
committed
Update to use dynamic versioning
1 parent b4bf90b commit 6b98d6f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/pypi.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ jobs:
1818
run: |
1919
python -m pip install --upgrade pip
2020
pip install hatch
21-
- name: Build the func_adl wheel
22-
env:
23-
func_adl_version: ${{ github.ref }}
21+
- name: Build the package
2422
run: |
23+
echo "__version__=${{ github.ref }}" >> func_adl/version.txt
2524
hatch build
2625
- name: Publish a func_adl to PyPI
2726
uses: pypa/gh-action-pypi-publish@v1.3.1

func_adl/version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.1a1"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ build-backend = "hatchling.build"
1010

1111
[project]
1212
name = "func_adl"
13-
version = "0.0.1a1"
1413
description = "Functional Analysis Description Language Base Package"
1514
readme = "README.md"
1615
authors = [
@@ -38,6 +37,7 @@ classifiers = [
3837
dependencies = [
3938
"make-it-sync"
4039
]
40+
dynamic = ["version"]
4141

4242
[project.optional-dependencies]
4343
test = [
@@ -59,7 +59,7 @@ test = [
5959
# No scripts defined in setup.py
6060

6161
[tool.hatch.version]
62-
path = "func_adl/__init__.py"
62+
path = "func_adl/version.txt"
6363

6464
[tool.hatch.build.targets.sdist]
6565
include = ["README.md"]

0 commit comments

Comments
 (0)