Skip to content

Commit 0f4bf13

Browse files
authored
adds hatch (#11)
* adds hatch * updates scripts and version
1 parent bbdd748 commit 0f4bf13

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Makefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22
.DEFAULT_GOAL := help
33

44
TEST_RESULTS := test_results
5-
APP_NAME := actions-repository-filtering
65
SYSTEM_PYTHON := python
76

8-
define VERSION_PYSCRIPT
9-
import pkg_resources
10-
version = pkg_resources.get_distribution('pygithubactions').version
11-
endef
12-
export VERSION_PYSCRIPT
137

14-
VERSION := $(SYSTEM_PYTHON) -c "$$VERSION_PYSCRIPT"
8+
VERSION := $$(hatch version)
159
TAG := v$(VERSION)
1610

1711
define BROWSER_PYSCRIPT
@@ -34,9 +28,8 @@ help:
3428
{printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
3529

3630
tag: ## create and push a tag for the current version
37-
echo $(TAG)
38-
# git tag $(TAG)
39-
# git push origin $(TAG)
31+
git tag $(TAG)
32+
git push origin $(TAG)
4033

4134
release: ## package and upload a release
4235
@echo "For further usage."

pygithubactions/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from pygithubactions.core import core
22
from pygithubactions.core import path_utils as path
3+
4+
VERSION = '0.1.4'

pyproject.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[project]
2-
32
name = "pygithubactions"
4-
version = "0.1.3"
53
description = "Github actions core library implemented in python"
64
readme = "README.md"
75
requires-python = ">=3.8"
@@ -16,13 +14,15 @@ classifiers = [
1614
"Intended Audience :: Developers",
1715
"Topic :: Software Development :: Build Tools",
1816
"License :: OSI Approved :: MIT License",
17+
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",
2221
"Programming Language :: Python :: 3 :: Only",
2322
]
2423

2524
dependencies = []
25+
dynamic = ["version"]
2626

2727
[project.urls] # Optional
2828
"Homepage" = "https://github.com/lestex/pygithubactions.git"
@@ -31,8 +31,8 @@ dependencies = []
3131
[build-system]
3232
# These are the assumed default build requirements from pip:
3333
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
34-
requires = ["setuptools>=43.0.0", "wheel"]
35-
build-backend = "setuptools.build_meta"
34+
requires = ["hatchling"]
35+
build-backend = "hatchling.build"
3636

3737
[tool.setuptools]
3838
packages = [
@@ -59,8 +59,13 @@ select = [
5959
]
6060

6161
[tool.ruff.per-file-ignores]
62-
"__init__.py" = ["F401"]
62+
"__init__.py" = ["F401", "F811"]
6363
"tests/*.py" = ["E501"]
6464

6565
[tool.ruff.mccabe]
6666
max-complexity = 3
67+
68+
[tool.hatch]
69+
70+
[tool.hatch.version]
71+
path = "pygithubactions/__init__.py"

0 commit comments

Comments
 (0)