Comments (4)
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.
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.
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.
@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)
- separators and modifiers HOT 2
- proposal: build identifier after modifiers HOT 7
- Do you have a plan to support timezone? HOT 4
- Behaviour of the 'micro' inc function HOT 17
- Modifier gets set to -1 when bumping calendar and minor for a previous month version. HOT 1
- Level 2 semantic tags are incremented incorrectly for pre-releases
- Reset increments HOT 8
- inc behavior unclear HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-calver.