Giter Site home page Giter Site logo

Comments (2)

mtkennerly avatar mtkennerly commented on May 22, 2024

Hi! This isn't an issue with Version.serialize, but rather is a side effect of a bug fix. Dunamai's default tag pattern previously required versions with three parts (v0.3.0), but that was an oversight, because Dunamai is meant to work also for other versioning systems like PEP 440 where 0.3 or 0.3.0.5 would be valid. So your v0.3 tag, which was previously ignored because it did not match the default pattern, is now being recognized as a version tag, so Dunamai tries to use it, but then it fails because it's invalid under Semantic Versioning (should be v0.3.0).

If you can't or don't want to change the tags, then you can pass a custom pattern to Version.from_git. This was the previous one, if you want to use it as-is:

_VERSION_PATTERN = r"""
(?x) (?# ignore whitespace)
^v(?P<base>\d+\.\d+\.\d+) (?# v1.2.3)
(-?((?P<stage>[a-zA-Z]+)\.?(?P<revision>\d+)?))? (?# b0)
(\+(?P<tagged_metadata>.+))?$ (?# +linux)
""".strip()

from dunamai.

 avatar commented on May 22, 2024

Hi! Thank you for the quick response. Yes, I investigated the issue a little bit more, you are correct. Thank you for the clarification.

from dunamai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.