GithubHelp home page GithubHelp logo

Comments (4)

kherock avatar kherock commented on June 2, 2024 1

I'm not sure what you mean, in my case I don't have major releases. Every month or so when I go to make a release, I do a version bump to the current date. Sometimes I'll end up with more than one release in a month, which ends up incrementing versions resembling 21.12.1, 21.12.2, etc. This is the whole reason I'm using CalVer - I don't want to think about the semantics of a major vs minor vs patch bump since the software I'm releasing doesn't have a public API.

The most important thing that I want out of this library is that it saves me from teaching my release pipeline how to increment the version when the date hasn't changed substantially. I don't see a simple way for me to increment my version number without my pipeline being aware of the date on the last release with the current API.

> const fmt = 'YY.MM.patch'
> calver.inc(fmt, '21.12.0', 'calendar')
'21.12.0' // doesn't return a new version number

> calver.inc(fmt, '21.11.0', 'patch')
'21.11.1' // version number has an incorrect month

> calver.inc(fmt, calver.inc(fmt, '21.11.0', 'calendar'), 'patch')
'21.12.1' // skipped version '21.12.0'

from node-calver.

muratgozel avatar muratgozel commented on June 2, 2024

Hey @kherock

You have to be specifying the level of the release when releasing it in your codebase, don't you?

If you were set it to calendar.minor but what if a major update comes?

from node-calver.

muratgozel avatar muratgozel commented on June 2, 2024

I understand. Yes, I intentionally ignored this use case. In the current implementation, the library is more flexible and have the potential to cover various use cases. Your use case can be implemented as:

calver.inc(fmt, '21.12.0', 'calendar', {fallbackLevelOrSecondaryLevel: 'semantic'})

I'll be asking to use the previous release until I implement this.

from node-calver.

muratgozel avatar muratgozel commented on June 2, 2024

@kherock hello hello again, sorry for returning late about this. i made the library a bit more opinionated. regarding this case, the lib supports specifying calendar and semantic tags again. so you can safely use the example you gave above. it will try to increase calendar portion and after that the semantic portion increase/reset depending on the calendar portion updated or not.

Closing this case now but please let me know if you need any help in this.

from node-calver.

Related Issues (9)

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.