How do I use Jenkins to maintain versioning on a Python project?

HOW TO -️ October 18, 2021

An independent Jenkins server monitors my develop branch in Team Foundation Server's Git repository and builds a new package when it's updated. The problem I'm having is that it uses the same version, specified in I could configure pypi-server to allow overwrites, but prefer to maintain build history.

Theoretically, there could be a build step that checks the version and increments it, but I'm hoping that someone has already done this work and published it somewhere.

Has anyone seen something like this?


could you please clarify if your code is hosted on gitlab, github, bitbucket or something else? This may help to narrow the relevant answers.