Skip to content

Commit

Permalink
chore: auto-versioning (#89)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Jun 7, 2023
1 parent 867a3f6 commit 75fcacf
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
2 changes: 2 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: hynek/build-and-inspect-python-package@v1

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
Expand All @@ -65,6 +67,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: hynek/build-and-inspect-python-package@v1

Expand All @@ -73,6 +77,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Run repo-review action
uses: ./
Expand Down
27 changes: 13 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"


Expand All @@ -8,30 +8,27 @@ name = "repo_review"
authors = [
{ name = "Henry Schreiner", email = "[email protected]" },
]
license = { file = "LICENSE" }

description = "Framework that can run checks on repos"
readme = "README.md"

requires-python = ">=3.10"

classifiers = [
"License :: OSI Approved :: BSD License",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Operating System :: OS Independent",
"Environment :: Console",
"Environment :: WebAssembly :: Emscripten",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]

dynamic = ["version"]

dependencies = [
"markdown-it-py",
"pyyaml",
Expand Down Expand Up @@ -70,8 +67,10 @@ repo-review = "repo_review.__main__:main"
[project.entry-points."repo_review.fixtures"]
pyproject = "repo_review.fixtures:pyproject"


[tool.hatch]
version.path = "src/repo_review/__init__.py"
version.source = "vcs"
build.hooks.vcs.version-file = "src/repo_review/_version.py"


[tool.pytest.ini_options]
Expand Down
2 changes: 1 addition & 1 deletion src/repo_review/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

from __future__ import annotations

__version__ = "0.7.0b5"
from ._version import version as __version__

__all__ = ["__version__"]
4 changes: 4 additions & 0 deletions src/repo_review/_version.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import annotations

version: str
version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str]

0 comments on commit 75fcacf

Please sign in to comment.