Code Monkey home page Code Monkey logo

Comments (10)

grosser avatar grosser commented on August 29, 2024

from bump.

bquorning avatar bquorning commented on August 29, 2024

I think it’s possible to accomplish with colons instead of brackets, i.e. rake bump:pre:alpha.

from bump.

bquorning avatar bquorning commented on August 29, 2024

There are a few edge cases to consider, e.g.:

» rake bump:current
Current version: 1.2.3
» rake bump:alpha
Bump version 1.2.3 to 1.2.3-alpha1
» rake bump:beta
Bump version 1.2.3-alpha1 to 1.2.3-beta1
» rake bump:alpha
… what now?

from bump.

grosser avatar grosser commented on August 29, 2024

from bump.

jasonkarns avatar jasonkarns commented on August 29, 2024

It's also worth noting that 1.2.3-alpha is not an increase from 1.2.3.

Really, in order to go from a non-pre release to a pre-release, one would need to know the eventual non-pre target. ie, if current is 1.2.3, pre-major would be 2.0.0-alpha, pre-minor would be 1.3.0-alpha, and pre-patch would be 1.2.4-alpha.

Perhaps bump:pre:major, bump:pre:minor, bump:pre:patch to derive the correct increment for the prerelease. (Probably defaulting to pre:major?)

And then bump:pre:alpha, bump:pre:beta, bump:pre:rc to increment the counter when already on a prerelease?

from bump.

jasonkarns avatar jasonkarns commented on August 29, 2024

I'd also recommend that the pre-counter be dot-separated, as semver describes the pre-release version:

a series of dot separated identifiers immediately following the patch version

So 1.2.3-alpha.0 and 1.2.3-rc.4

from bump.

mckomo avatar mckomo commented on August 29, 2024

Hey, I've added PR that adds new prerelease bumps here #81.

Regarding applying the prerelease label to the final version (e.g. 1.2.3 => 1.2.3-alpha) I propose following workflow.

➜ bump major --no-commit
# Bump from 1.2.3 to 2.0.0
➜ bump alpha
# Commits to git
# Bump from 2.0.0 to 2.0.0-alpha

from bump.

jasonkarns avatar jasonkarns commented on August 29, 2024

It might be worth following patterns that other version bumping tools follow:

npm has premajor, preminor, and prepatch which does the bumping of the relevant major/minor/patch bit as well as the prerelease bit all at once, so that multiple steps aren't necessary: https://docs.npmjs.com/cli/version. (That's part of my inspiration for bump:pre:major, et. al.)

from bump.

jefferson-rios-globant avatar jefferson-rios-globant commented on August 29, 2024

Hi guys, I found this gem very useful, but you need to add the alpha, beta and rc bumps.
I thing the @mckomo PR could work.

from bump.

grosser avatar grosser commented on August 29, 2024

bump is for "idk what version I'm on, but this is a patch"
so having to say ":alpha/:beta/:rc" means the user knows what the current state is (can't do beta after rc etc)
so simple solution would be to bump:set 🤷

  • if we add alpha/beta/rc then they should have .1 suffix to follow semver
  • I'd prefer to hide them and :pre from -T to not spam a projects rake tasks with it
  • ideally get rid of pre since it's unintuitive no matter what way it's implemented
  • bump:set could be interactive and say hey it's 1.2.3-alpha.5 now, what do you want to set it to, to make it intuitive and open

from bump.

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.