From d93fd3286c9be38d09109c869ee68f01335b2225 Mon Sep 17 00:00:00 2001 From: cclecle Date: Mon, 20 Mar 2023 00:03:58 +0000 Subject: [PATCH] test: tag_regex to extract verison only --- Jenkinsfile | 4 ++-- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8683d0f..0e9b26d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -129,7 +129,7 @@ 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 --upgrade setuptools build pip copier jinja2-slug toml \"setuptools-git-versioning<2\"") + sh(". ~/BUILD_ENV/bin/activate && pip install --upgrade setuptools build pip copier jinja2-slug toml") sh(". ~/TOOLS_ENV/bin/activate && pip install simple_rest_client requests") sh(". ~/TOOLS_ENV/bin/activate && pip install git+https://chacha.ddns.net/gitea/chacha/pygitversionhelper.git@master") @@ -215,7 +215,7 @@ pipeline { PY_PROJECT_VERSION_STRIPPED=ExtractBaseVersion(PY_PROJECT_VERSION) // Manually pushing a new tag with version string guessed by gitversionhelper - // because setuptools-git-versioning cant fing tag on other branches, so will guess a wring version without this tag. + // because setuptools-git-versioning / setuptools_scm cant fing tag on other branches, so will guess a wrong version without this tag. if(latestTag!=PY_PROJECT_VERSION) { sh("git tag $PY_PROJECT_VERSION") sh("git push origin --tags") diff --git a/pyproject.toml b/pyproject.toml index a88db09..d25c8fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools_scm] version_scheme= "post-release" +tag_regex="^(?:v)?(?P\d+\.\d+\.\d+)([\.\-\+])?(?:.*)?" [project] name = "pygitversionhelper" -- 2.47.3