Git Product home page Git Product logo

Comments (2)

mikestead avatar mikestead commented on September 24, 2024

@Rescla Thanks for the detailed report.

I'm thinking how and if we can get this working as you'd want. We'd need to look at the latest commit from a branch and try and find the most recent tag based on this. I may have a quick look at this over the weekend but no promises.

You'd need to be aware of tag collisions here though, e.g. 1.0.1 may already exist from main line, perhaps introduce a metadata tag e.g 1.0.1+hotfix.1

from bitbucket-semver.

Rescla avatar Rescla commented on September 24, 2024

@mikestead Thanks for the quick reply :)

My current workaround is this: https://gist.github.com/Rescla/1728ff5924bbc8aff1508d07e5a72052 and provide the latest version manually using --current. I resolve the current version using git describe release/1.0 --tags --abbrev=0, which will give me the most recent (unannotated) tag in the commit chain, which is 1.0.0 in this case.

This is a naive implementation though, since as you mentioned this might result in conflicting tags. However, if the caller is responsible for providing the base tag I think it is acceptable to also make them responsible for tag conflicts. That would work for me since we won't have patch pull requests in master, only in release branches. We treat non zero patch versions as hotfix versions always.

I'm thinking it should throw an error though, or return a status like 'unchanged' whenever you have two conflicting version chains.

Adding metadata feels a bit iffy to me since without knowing the branch structure I would think that they are two builds with the same functional scope, which is not the case. Returning 1.0.2 would not be acceptable I think, I would personally expect 1.0.2 to contain 1.0.1.

from bitbucket-semver.

Related Issues (3)

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.