Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ release :
[[ -d venv.release ]] && rm -rf venv.release || true
[[ -d dist ]] && rm -rf dist || true
$(PYTHON) -mvenv venv.release
venv.release/bin/pip install twine
venv.release/bin/pip install --upgrade build
venv.release/bin/python -m build
FEDITEST_RELEASE_VERSION=y venv.release/bin/pip install twine
FEDITEST_RELEASE_VERSION=y venv.release/bin/pip install --upgrade build
FEDITEST_RELEASE_VERSION=y venv.release/bin/python -m build
@echo WARNING: YOU ARE NOT DONE YET
@echo The actual push to pypi.org you need to do manually. Enter:
@echo venv.release/bin/twine upload dist/*
Expand Down
17 changes: 17 additions & 0 deletions hatch_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Set a dynamic version number, see https://hatch.pypa.io/dev/how-to/config/dynamic-metadata/
# At release time, override with env var: FEDITEST_RELEASE_VERSION=y
#

from datetime import datetime
import os

from hatchling.metadata.plugin.interface import MetadataHookInterface


class JSONMetaDataHook(MetadataHookInterface):
def update(self, metadata):
if 'FEDITEST_RELEASE_VERSION' in os.environ and os.environ['FEDITEST_RELEASE_VERSION'].lower() == 'y':
metadata['version'] = metadata['base_version']
else:
metadata['version'] = metadata['base_version'] + '.dev' + datetime.now().strftime("%Y%m%d%H%M%S")
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ build-backend = "hatchling.build"

[project]
name = "feditest"
version = "0.5"
base_version = "0.6"
dynamic = ["version"]
authors = [
{ name="Johannes Ernst", email="git@j12t.org" },
{ name="Steve Bate", email="svc-github@stevebate.net" }
Expand Down Expand Up @@ -62,6 +63,9 @@ exclude = [
"docs/"
]

[tool.hatch.metadata.hooks.custom]
# Empty: https://hatch.pypa.io/dev/how-to/config/dynamic-metadata/

[tool.pylint."MESSAGES CONTROL"]
max-line-length=120
disable="arguments-renamed, empty-docstring, global-variable-not-assigned, line-too-long, missing-class-docstring, missing-function-docstring, too-few-public-methods, too-many-arguments"
Expand Down
Loading