Merge pull request 'dev' (#5) from dev into master
Reviewed-on: https://chacha.ddns.net/gitea/chacha/pygitversionhelper/pulls/5
This commit was merged in pull request #5.
This commit is contained in:
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@@ -129,7 +129,6 @@ pipeline {
|
||||
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 git+https://chacha.ddns.net/gitea/chacha/pygitversionhelper.git@master")
|
||||
|
||||
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")
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -7,12 +7,13 @@
|
||||
# work. If not, see <https://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
|
||||
[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"
|
||||
|
||||
Reference in New Issue
Block a user