From ee8db499e1e20878de4acd68570670670abbc54f Mon Sep 17 00:00:00 2001 From: Julian Rother <julian@cccv.de> Date: Thu, 19 Oct 2023 20:15:10 +0200 Subject: [PATCH] PEP 440 conformance for development builds Recent setuptools releases refuse to build packages with invalid version strings. So instead of using the bare commit hash as the version, we now build proper version strings like X.Y.Z.dev-git.COMMIT for CI development builds and X.Y.Z for release builds (same as before). --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91d6529..352623f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ before_script: - uname -a - python3 -m pylint --version - python3 -m coverage --version - - echo "${CI_COMMIT_TAG}" | grep -qE "v[0-9]+[.][0-9]+[.][0-9]+.*" && export UFFD_PACKAGE_VERSION="${CI_COMMIT_TAG#v}" || export UFFD_PACKAGE_VERSION="${CI_COMMIT_SHA}" + - export UFFD_PACKAGE_VERSION="$(git describe | sed -E -n -e 's/^v([0-9.]*)$/\1/p' -e 's/^v([0-9.]*)-([0-9]*)-g([0-9a-z]*)$/\1.dev+git.\3/p' | grep .)" .build: stage: build -- GitLab