From f1b1901f8a4eee3abb9b1287f9a5fc665b0ae64c Mon Sep 17 00:00:00 2001 From: cclecle Date: Fri, 24 Mar 2023 21:37:55 +0000 Subject: [PATCH 1/5] format + dynamic readme --- README.md | 4 ++-- pyproject.toml | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 65e1808..965068d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ _A tiny library to help versioning management of git python projects_ Because a good developer is a lazy developer and version management in CI/CD can be very time consuming. -Checkout [Latest Documentation](https://chacha.ddns.net/mkdocs-web/chacha/pygitversionhelper/{{branch}}/latest/). +Checkout [Latest Documentation](https://chacha.ddns.net/mkdocs-web/chacha/{{repository}}/{{branch}}/latest/). ## Features - list tags @@ -23,7 +23,7 @@ Checkout [Latest Documentation](https://chacha.ddns.net/mkdocs-web/chacha/pygitv - get current version (bumped) - convert / switch from SemVer to PEP440 (both ways) - automatic version format detection (SemVer by default) - - Get commit message history + - get commit message history ## Options - restrict to same branch diff --git a/pyproject.toml b/pyproject.toml index 900012f..eb2d6d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ # work. If not, see . [build-system] -requires = ["setuptools>=63", "wheel", "setuptools_scm"] +requires = ["setuptools>=63", "wheel", "setuptools_scm","hatchling", "hatch-fancy-pypi-readme"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] @@ -16,7 +16,6 @@ version_scheme= "post-release" [project] name = "pygitversionhelper" description = "pygitversionhelper" -readme = "README.md" requires-python = ">=3.9" keywords = ["chacha","chacha","template","pygitversionhelper"] license = { file = "LICENSE.md" } @@ -36,7 +35,21 @@ dependencies = [ 'importlib-metadata; python_version<"3.9"', 'packaging' ] -dynamic = ["version"] +dynamic = ["version","readme"] + +[tool.hatch.metadata.hooks.fancy-pypi-readme] +content-type = "text/markdown" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +path = "README.md" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +pattern = "{{repository}}" +replacement = "pygitversionhelper" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +pattern = "{{branch}}" +replacement = "master" [tool.setuptools] platforms = ["any"] From b20e5bd86855c5e7ee89486f966606b53c90a06f Mon Sep 17 00:00:00 2001 From: cclecle Date: Fri, 24 Mar 2023 21:46:51 +0000 Subject: [PATCH 2/5] fix --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eb2d6d5..e8c0ab1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ [build-system] requires = ["setuptools>=63", "wheel", "setuptools_scm","hatchling", "hatch-fancy-pypi-readme"] -build-backend = "setuptools.build_meta" +build-backend = "hatchling.build" [tool.setuptools_scm] version_scheme= "post-release" From f32127abd754a875d1d02bf39a538a73dd234e22 Mon Sep 17 00:00:00 2001 From: cclecle Date: Fri, 24 Mar 2023 22:12:08 +0000 Subject: [PATCH 3/5] revert to static readme file... :-/ --- pyproject.toml | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e8c0ab1..c410f90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,8 +7,8 @@ # work. If not, see . [build-system] -requires = ["setuptools>=63", "wheel", "setuptools_scm","hatchling", "hatch-fancy-pypi-readme"] -build-backend = "hatchling.build" +requires = ["setuptools>=63", "wheel", "setuptools_scm"] +build-backend = "setuptools.build_meta" [tool.setuptools_scm] version_scheme= "post-release" @@ -35,21 +35,7 @@ dependencies = [ 'importlib-metadata; python_version<"3.9"', 'packaging' ] -dynamic = ["version","readme"] - -[tool.hatch.metadata.hooks.fancy-pypi-readme] -content-type = "text/markdown" - -[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] -path = "README.md" - -[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] -pattern = "{{repository}}" -replacement = "pygitversionhelper" - -[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] -pattern = "{{branch}}" -replacement = "master" +dynamic = ["version"] [tool.setuptools] platforms = ["any"] From 876e428003eca924f748bdf468cd66cd0260165e Mon Sep 17 00:00:00 2001 From: cclecle Date: Fri, 24 Mar 2023 22:38:22 +0000 Subject: [PATCH 4/5] remove dynamic link to doc in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 965068d..f6de565 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ _A tiny library to help versioning management of git python projects_ Because a good developer is a lazy developer and version management in CI/CD can be very time consuming. -Checkout [Latest Documentation](https://chacha.ddns.net/mkdocs-web/chacha/{{repository}}/{{branch}}/latest/). +Checkout [Latest Documentation](https://chacha.ddns.net/mkdocs-web/chacha/pygitversionhelper/master/latest/). ## Features - list tags From a045a47cb0d3e3886d24e55a38bdb0e911a81c4c Mon Sep 17 00:00:00 2001 From: cclecle Date: Fri, 24 Mar 2023 22:48:03 +0000 Subject: [PATCH 5/5] re-add readme --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c410f90..1ba1261 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,8 @@ version_scheme= "post-release" [project] name = "pygitversionhelper" -description = "pygitversionhelper" +description = "A simple simple git version helper in python." +readme = "README.md" requires-python = ">=3.9" keywords = ["chacha","chacha","template","pygitversionhelper"] license = { file = "LICENSE.md" }