From 3e130e6bdf77fe28d0e84e283ae2dfec3c8b85ce Mon Sep 17 00:00:00 2001 From: cclecle Date: Sun, 19 Mar 2023 18:42:24 +0000 Subject: [PATCH] revert to full setuptools-git-versioning in toml file --- Jenkinsfile | 3 +-- docs-static/usage.md | 3 +++ pyproject.toml | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index eed7fa9..102c075 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -128,7 +128,6 @@ pipeline { sh("virtualenv --pip=embed --setuptools=embed --wheel=embed --no-periodic-update --activators bash,python TEST_ENV") sh("virtualenv --pip=embed --setuptools=embed --wheel=embed --no-periodic-update --activators bash,python TOOLS_ENV") - sh(". ~/BUILD_ENV/bin/activate && pip install git+https://chacha.ddns.net/gitea/chacha/pygitversionhelper.git@master") sh(". ~/BUILD_ENV/bin/activate && pip install --upgrade setuptools build pip copier jinja2-slug toml \"setuptools-git-versioning<2\"") sh(". ~/TOOLS_ENV/bin/activate && pip install simple_rest_client requests") @@ -179,7 +178,7 @@ pipeline { // using setuptools_git_versioning to get the generated version number based on Git tags and logs // TODO: read dev_template from toml PY_PROJECT_VERSION = sh(script: """#!/bin/sh - - |. ~/BUILD_ENV/bin/activate + |. ~/TOOLS_ENV/bin/activate |exec python - << '__EOWRAPPER__' | |from pygitversionhelper import gitversionhelper diff --git a/docs-static/usage.md b/docs-static/usage.md index 9158789..ff33748 100644 --- a/docs-static/usage.md +++ b/docs-static/usage.md @@ -82,6 +82,7 @@ Get the last found version in the repository [return formated string]: print(f"most recent repository version: {gitversionhelper.version.getLastVersion(formated_output=True)}") Others kwargs available to this function: + * version_std: string to force a version standard for rendering ["PEP440" or "SemVer"] * same_branch: boolean to force searching on same branch * ignore_unknown_tags: boolean to allow unknown tag to be ignored @@ -95,6 +96,7 @@ Or with formated output: print(f"current repository version: {gitversionhelper.version.getCurrentVersion(formated_output=True)}") kwargs available to this function: + * All same args as getLastVersion() * bump_type: if version need to be pump, allow to configure next release update type: major, minor, patch, dev * bump_dev_strategy: if bump_type is dev, allow to choose dev update strategy: post, pre-patch, pre-minor, pre-major @@ -112,6 +114,7 @@ kwargs available to those function: ## Limitations There is unfortunately some technical limitation : + * MultiThreading and async behavior is not tested. * Multiple tag on the same commit is not supported. * Branch filter when searching for a version is only tested with -no-ff strategy \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8181d3b..fb3f01f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,12 +7,13 @@ # work. If not, see . [build-system] -requires = ["setuptools>=63", "wheel", "setuptools-git-versioning<2","pygitversionhelper"] +requires = ["setuptools>=63", "wheel", "setuptools-git-versioning<2"] build-backend = "setuptools.build_meta" [tool.setuptools-git-versioning] enabled = true -version_callback = "pygitversionhelper.gitversionhelper.version.getCurrentFormatedVersion" +dev_template = "{tag}.post{ccount}" +tag_filter = "^\\d+\\.\\d+\\.\\d+$" [project] name = "pygitversionhelper"